[ nice-Bugs-825290 ] instanceof type inference fails for A<T>
"SourceForge.net" <[email protected]>
| Newsgroups | gmane.comp.lang.nice.devel |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #825290, was opened at 2003-10-17 17:30
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=825290&group_id=12788
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Rohan Hart (dr_dee)
Assigned to: Nobody/Anonymous (nobody)
Summary: instanceof type inference fails for A<T>
Initial Comment:
package A;
class A<T> {}
class B<T> extends A<T> {
T t;
}
void f() {
A<String> a = ff(new B(t: "hi").t);
while (a instanceof B) {
a = ff(a.t); // error on this line for a.t
}
}
A<String> ff(String s) = new B(t: s);
----
Arguments (A.B<A.A<java.lang.String>>) do not fit:
T A.B.t
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=112788&aid=825290&group_id=12788
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php