[ nice-Bugs-892625 ] Runtime error in generated code
"SourceForge.net" <[email protected]>
| Newsgroups | gmane.comp.lang.nice.devel |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #892625, was opened at 2004-02-07 23:28
Message generated for change (Comment added) made by bonniot
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=112788&aid=892625&group_id=12788
Category: None
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
>Assigned to: Daniel Bonniot (bonniot)
Summary: Runtime error in generated code
Initial Comment:
With the current CVS version, this code compiles:
<T> List<int> sizes (List<List<T>> lists)
{
return lists.map(List<T> list => list.size);
}
void main(String[] args) {
println(sizes([[1,2,3],[4,5,6]]));
}
but fails like this when run:
C:\src\nice>java -jar test.jar
Exception in thread "main" Argument #0 to 'lambda' has
wrong type
at gnu.mapping.WrongType.make(WrongType.java:56)
at test.fun.apply1(C:\src\nice\.\test)
at
gnu.expr.ModuleMethod.apply1(ModuleMethod.java:89)
at nice.lang.fun$map.lambda14(Unknown Source)
at nice.lang.fun$map.apply1(Unknown Source)
at
gnu.expr.ModuleMethod.apply1(ModuleMethod.java:89)
at
nice.lang.fun.fill(C:\src\nice\nice\stdlib\nice\lang:190)
at
nice.lang.dispatch.fill(C:\src\nice\nice\classes\nice\lang)
at
nice.lang.fun.map(C:\src\nice\nice\stdlib\nice\lang)
at
nice.lang.dispatch.map(C:\src\nice\nice\classes\nice\lang)
at test.fun.sizes(C:\src\nice\.\test:4)
at test.dispatch.sizes(C:\src\nice\.\test)
at test.fun.main(C:\src\nice\.\test:2)
Caused by: java.lang.ClassCastException
... 12 more
----------------------------------------------------------------------
Comment By: Daniel Bonniot (bonniot)
Date: 2004-02-11 14:49
Message:
Logged In: YES
user_id=88952
This bug has been fixed. The next release of the compiler will
include this correction. In the mean time, I encourage you try
the development version. It contains a version of the compiler
that fixes the bug. Please try it and reopen the bug-report if
you find any problem with it.
To know how to get an install the development version of the
compiler that fixes this bug, please read
http://nice.sourceforge.net/cgi-bin/twiki/view/Dev/DevelopmentVersion
Note that the bug has first been fixed in the CVS version, and it
might take one or two hours until the development version
includes the fix.
Thanks again for your help by submiting this bug report.
Daniel Bonniot
----------------------------------------------------------------------
Comment By: Arjan Boeijink (arjanb)
Date: 2004-02-08 00:12
Message:
Logged In: YES
user_id=688815
It is the same bug as #761629 (
https://sourceforge.net/tracker/index.php?
func=detail&aid=761629&group_id=12788&atid=112788 ) I
think.
----------------------------------------------------------------------
Comment By: Bryn Keller (xoltar)
Date: 2004-02-07 23:29
Message:
Logged In: YES
user_id=2706
Forgot to log in first before submitting this.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=112788&aid=892625&group_id=12788
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn