[ nice-Bugs-989049 ] Interface - WrongType at runtime
"SourceForge.net" <[email protected]> Thu, 15 Jul 2004 03:56:17 -0700
| Newsgroups | gmane.comp.lang.nice.devel |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #989049, was opened at 2004-07-11 22:28
Message generated for change (Comment added) made by bonniot
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=112788&aid=989049&group_id=12788
Category: None
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Isaac Gouy (igouy)
>Assigned to: Daniel Bonniot (bonniot)
Summary: Interface - WrongType at runtime
Initial Comment:
void main(String[] args){
String a = "hello";
println( a.test() );
}
interface ITest { String test(); }
class java.lang.String implements ITest;
test(String a) = "done";
I:\Nice\Test>nicec --sourcepath .. -a t.jar Test
nice.lang: parsing
Test: parsing
Test: typechecking
Test: generating code
Test: linking
Test: writing in archive
nice.lang: writing in archive
I:\Nice\Test>java -jar t.jar
Exception in thread "main" Argument #0 to 'test' has
wrong type
at gnu.mapping.WrongType.make(WrongType.java:56)
at Test.fun.main(Test.nice:3)
at Test.dispatch.main(dispatch.nice)
Nice compiler version 0.9.8 (build 2004.07.02, 18:42:24
UTC)
----------------------------------------------------------------------
>Comment By: Daniel Bonniot (bonniot)
Date: 2004-07-15 12:56
Message:
Logged In: YES
user_id=88952
Right, existing classes can implement non-abstract interfaces only if they were defined in Nice. Otherwise you still need to use abstract interfaces.
This condition is now checked in the CVS version of the compiler.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=112788&aid=989049&group_id=12788
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click