[ nice-Bugs-888229 ] equals dispatching on exact type
"SourceForge.net" <[email protected]>
| Newsgroups | gmane.comp.lang.nice.devel |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #888229, was opened at 2004-01-31 09:57
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=112788&aid=888229&group_id=12788
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Isaac Gouy (igouy)
Assigned to: Nobody/Anonymous (nobody)
Summary: equals dispatching on exact type
Initial Comment:
class A { int i = 0; }
class B extends A { int k = 0; }
equals (#A x, #A y) = x.i == y.i;
equals (#B x, #B y) = x.k == y.k;
void main(String[] args){
let a = new A();
let b = new B();
println( a.equals(a) );
println( a.equals(b) );
println( b.equals(a) );
println( b.equals(b) );
}
\Nice\Test>java -jar t.jar
true
false
true
true
Nice compiler version 0.9.6 prerelease (build 2004.01.30,
19:05:54 UTC)
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=112788&aid=888229&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