Bad code is green: complex generics problem

Hello,

in our company's code we occasionally run into a problem like the following: Idea does not highlight the code below as having an error, however compiling it fails:

 conforms to X]]>"
Interestingly, Eclipse (which is used by everyone in our project but me) does not have a problem with this either and even compiles it.

If line 10 gets replaced to
 x = b.getX();
]]>

the compiler is happy, but Idea highlights the additional "<A>" with the warning "Explicit type arguments can be inferred".

Is this a known bug? If not, I will enter a Jira issue.

Regards,
Jens

P.S.: BTW, this happens both in Selena (7718) and in Diana (8375)

0
2 comments

Sounds like a bug in the Sun compiler.

0

Ah, yes, you are right! With Google's help I found
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6468354

Best regards,
Jens

0

Please sign in to leave a comment.