This content has been marked as final. Show 5 replies
just tried it in 1.6.0_22 and got the same exception. looks like a bug to me.1 person found this helpful
1 person found this helpful
rxcolvin wrote:Minor correction: Eclipse doesn't use Jikes (and as far as I know never did). They do have their own compiler however (called simply the Eclipse Java Compiler). ECJ is written in Java, as opposed to Jikes, which is written in C++.
Apparently, this doesn't occur when run under Eclipse, presumably compiled byJikes.
Edit: confirmed to be broken with javac from the Sun JDK (6u22) and the OpenJDK 1.6.0_20. Works when compiled with the Eclipse compiler (both with conformance 1.5 and 1.6) from an up-to-date Eclipse 3.6.1.
It wouldn't be the first time that ECJ gets something right that javac doesn't compile correctly.
I don't understand the purpose of TT extends T in the above. Why not just use T?
Thanks. I'm not an Eclipse user; I can't remember why I thought it used Jikes though - must be it's IBM heritage.!
Not great code: but it's actually just a simplification of some real code in our code base that stopped compiling. (Maybe that code wasn't so great either, but none the less the bug was surprising).