[ nice-Bugs-866853 ] ?t20 incorrect return type
"SourceForge.net" <[email protected]>
| Newsgroups | gmane.comp.lang.nice.devel |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #866853, was opened at 2003-12-28 16:40
Message generated for change (Comment added) made by igouy
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=112788&aid=866853&group_id=12788
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Isaac Gouy (igouy)
Assigned to: Nobody/Anonymous (nobody)
Summary: ?t20 incorrect return type
Initial Comment:
Unsure if this is a bug or incorrect use.
interface ReadablePropertyMap <Key,Value> {
?Value get(Key k);
}
class hash_property_map <A,B>
implements ReadablePropertyMap <A,B> {
HashMap<A,B> data = new HashMap();
get(k) = data.get(k); // line 10 ***
}
\Nice\graph_test\..\graph_test\hash_property_map.nice:
line 10, column 13:
Incorrect return type:
Found : ?t20
Expected: ?Value
----------------------------------------------------------------------
>Comment By: Isaac Gouy (igouy)
Date: 2003-12-29 05:37
Message:
Logged In: YES
user_id=536291
That gives:
I:\pls\Nice\graph_test>nicec --sourcepath .. -a t.jar
graph_test
nice.lang: parsing
graph_test: parsing
\Nice\graph_test\..\graph_test\hash_property_map.nice: line
1, column 43:
Constraints on type parameters should all be specified in the
prefix constraint
And this gives the ?t20 error again:
<Key,!Value> interface ReadablePropertyMap <Key,Value> {
?Value get(Key k);
}
----------------------------------------------------------------------
Comment By: Daniel Bonniot (bonniot)
Date: 2003-12-29 02:11
Message:
Logged In: YES
user_id=88952
Same kind of issue. The treatment of marker on type variables
will definitely need some polishing.
In this case I think the correct definition would be:
<Key,Value> interface ReadablePropertyMap <Key,!Value> {
?Value get(Key k);
}
----------------------------------------------------------------------
Comment By: Isaac Gouy (igouy)
Date: 2003-12-28 16:41
Message:
Logged In: YES
user_id=536291
Nice compiler version 0.9.6 prerelease (build 2003.12.28,
21:41:54 UTC)
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=112788&aid=866853&group_id=12788
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click