[ 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 14:28
Message generated for change (Comment added) made by xoltar
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=112788&aid=892625&group_id=12788

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
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: Bryn Keller (xoltar)
Date: 2004-02-07 14: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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.