Last active
December 29, 2015 19:10
-
-
Save hjanetzek/7715486 to your computer and use it in GitHub Desktop.
OpenJDK fail?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package eeek; | |
public class Test { | |
abstract class Inlist<T> { | |
T next; | |
} | |
abstract class Pool<T extends Inlist<T>> { | |
abstract T get(); | |
} | |
class Wupp extends Inlist<Wupp> { | |
public String m = "Ho!"; | |
} | |
Pool<Wupp> pool = new Pool<Test.Wupp>() { | |
public Wupp get() { | |
return new Wupp(); | |
} | |
}; | |
void test() { | |
Wupp a = pool.get(); | |
Wupp b; | |
b = a.next = pool.get(); | |
System.out.println(b.m); | |
} | |
public static void main(String[] args) { | |
new Test().test(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment