[ nice-Bugs-761629 ] runtime error: lists of tuples with list elements
"SourceForge.net" <[email protected]>
| Newsgroups | gmane.comp.lang.nice.devel |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #761629, was opened at 2003-06-27 08:14
Message generated for change (Comment added) made by bonniot
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=112788&aid=761629&group_id=12788
Category: None
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Rohan Hart (dr_dee)
>Assigned to: Daniel Bonniot (bonniot)
Summary: runtime error: lists of tuples with list elements
Initial Comment:
void main(String[] args) {
let List<(List<byte>, String)> a = [([1,2,3], "Hello")];
(List<byte> l1, String s1) = a[0];
}
throw: nice.tools.code.EnsureTypeProc has wrong type ([B)
The error occurs when assigning to l1 (of type List<byte>)
----------------------------------------------------------------------
Comment By: Daniel Bonniot (bonniot)
Date: 2004-02-11 14:48
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: 2003-06-27 13:53
Message:
Logged In: YES
user_id=688815
The bug is that an array nested in a another array or tuple
doesn't get wrapped to a list.
This code gives the same error:
List<List<int>> x = [[1,2,3]];
int i = x[0][1];
It possible to workaround this bug by assigning the inner array
to a list first.
Your example will work if you change it to:
let List<byte> x = [1,2,3];
let List<(List<byte>, String)> a = [(x, "Hello")];
(List<byte> l1, String s1) = a[0];
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=112788&aid=761629&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