Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Confusing Compiler ErrorMessage since 3.4.2
Confusing Compiler ErrorMessage since 3.4.2 [message #258916] Tue, 03 March 2009 04:43 Go to next message
Eclipse UserFriend
Hello,

since 3.4.2 Eclipse compiler throws error on following test case:

public class Test <T extends Comparable<String>> {

private T<String> x;
}

Error: The type T is not generic, it cannot be parameterized with
Argument<String>

Ok, i know this looks not nice and isn't necessary, but with with eclipse
3.4.1 there was no error. Anybody knows about this change ?
Re: Confusing Compiler ErrorMessage since 3.4.2 [message #258920 is a reply to message #258916] Tue, 03 March 2009 05:24 Go to previous messageGo to next message
Eclipse UserFriend
s.schnabl@qualitype.de (S.Schnabl) writes:

> Hello,
>
> since 3.4.2 Eclipse compiler throws error on following test case:
>
> public class Test <T extends Comparable<String>> {
> private T<String> x;
> }
>
> Error: The type T is not generic, it cannot be parameterized with
> Argument<String>
>
> Ok, i know this looks not nice and isn't necessary, but with with
> eclipse 3.4.1 there was no error. Anybody knows about this change ?


Failure to detect the error was a bug which seems to have been fixed
in 3.4.2.

Sun's javac (1.6.0_07) gives an error message for that class that I
would consider harder to understand:

Test.java:3: unexpected type
found : type parameter T
required: class
private T<String> x;
^
1 error

--
Owen Rees; speaking personally, and not on behalf of HP.
========================================================
Hewlett-Packard Limited. Registered No: 690597 England
Registered Office: Cain Road, Bracknell, Berks RG12 1HN
Re: Confusing Compiler ErrorMessage since 3.4.2 [message #258928 is a reply to message #258920] Tue, 03 March 2009 09:12 Go to previous message
Eclipse UserFriend
> Failure to detect the error was a bug which seems to have been fixed
> in 3.4.2.

Thx for your help. I searched bugzilla, but didn't find an entry for this
one, but no problem - fixing is trivial.

> Owen Rees; speaking personally, and not on behalf of HP.
Nice to meet an hp'ler here - greetings from an former one ;-)
Previous Topic:Stopping prematurely the SearchEngine
Next Topic:[EUT] Class path list check
Goto Forum:
  


Current Time: Sun Apr 20 19:40:56 EDT 2025

Powered by FUDForum. Page generated in 0.02890 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top