[ nice-Bugs-1070054 ] Nice allows multiple inequal retypings of a java method
"SourceForge.net" <[email protected]> Tue, 23 Nov 2004 08:25:05 -0800
| Newsgroups | gmane.comp.lang.nice.devel |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #1070054, was opened at 2004-11-20 08:05
Message generated for change (Settings changed) made by leblin
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=112788&aid=1070054&group_id=12788
Category: None
Group: None
>Status: Closed
Resolution: None
Priority: 5
Submitted By: Luc Perrin (leblin)
Assigned to: Nobody/Anonymous (nobody)
Summary: Nice allows multiple inequal retypings of a java method
Initial Comment:
Java:
public class A {
int getN( ) { return 0; }
}
Nice:
int getN(A) = native int A.getN();
boolean getN(A) = native int A.getN();
Nice will compile this code quietly.
----------------------------------------------------------------------
Comment By: Daniel Bonniot (bonniot)
Date: 2004-11-21 07:48
Message:
Logged In: YES
user_id=88952
Yes, it's not an error in itself to give several retypings
for the same method. Besides, Nice's type system being more
expressive than Java's, it's impossible to automatically
check if the retyping has the correct type. Therefore, I
would advise to just close this report.
One thing that could be done is to check the erasure of the
Nice type, and compare it to the Java type. If they don't
match somehow, one might want to give a warning or an error.
If you feel strongly about this, you could change the report
into a feature request for that.
----------------------------------------------------------------------
Comment By: Arjan Boeijink (arjanb)
Date: 2004-11-20 10:15
Message:
Logged In: YES
user_id=688815
I'm not sure this is a bug. Sometimes it's usefull to have
multiple retypings of a single method.
For example in nice.lang:
char get(String s, int index) = native char String.charAt(int);
char charAt(String s, int index) = native char String.charAt
(int);
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=112788&aid=1070054&group_id=12788
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/