Bug 181270 - [1.5][compiler] Class literal of array of type parameter should be rejected
Summary: [1.5][compiler] Class literal of array of type parameter should be rejected
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.3 M7   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 186496 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-04-05 14:19 EDT by Olivier Thomann CLA
Modified: 2007-05-11 09:33 EDT (History)
2 users (show)

See Also:


Attachments
Proposed fix (2.46 KB, patch)
2007-04-05 14:22 EDT, Olivier Thomann CLA
no flags Details | Diff
Regression tests (2.18 KB, patch)
2007-04-05 14:26 EDT, Olivier Thomann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Thomann CLA 2007-04-05 14:19:58 EDT
Using I20070403-1110, the following test cases compile fine. They should be rejected.

public class X<T> {
    void foo() {
        System.out.println(T[].class);
    }
}

public class X {
    <T> void foo() {
        System.out.println(T[].class);
    }
}
Comment 1 Olivier Thomann CLA 2007-04-05 14:22:06 EDT
Created attachment 63079 [details]
Proposed fix

This error message might not be ideal, but this prevents the addition of a new API constant in IProblem.
Comment 2 Olivier Thomann CLA 2007-04-05 14:25:50 EDT
Philippe, please double-check.
Comment 3 Olivier Thomann CLA 2007-04-05 14:26:17 EDT
Created attachment 63081 [details]
Regression tests
Comment 4 Olivier Thomann CLA 2007-04-05 15:44:05 EDT
Released for 3.3M7.
Philippe, please reopen if you believe it is not good enough.
Comment 5 Philipe Mulet CLA 2007-04-06 05:21:32 EDT
Fix looks good, thx.
Comment 6 Philipe Mulet CLA 2007-04-06 05:28:25 EDT
Pls backport to 3.2 maintenance.
Comment 7 Maxime Daniel CLA 2007-04-27 11:25:39 EDT
Verified for 3.3 M7 using  build I20070427-0010.
Comment 8 Philipe Mulet CLA 2007-05-11 03:28:38 EDT
*** Bug 186496 has been marked as a duplicate of this bug. ***
Comment 9 Olivier Thomann CLA 2007-05-11 09:33:44 EDT
Backported to 3.2 maintenance stream.