Bug 208030 - [1.7][compiler] Missing unused type argument warning for constructor invocations
Summary: [1.7][compiler] Missing unused type argument warning for constructor invocations
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 M4   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-30 11:50 EDT by Philipe Mulet CLA
Modified: 2007-12-11 11:59 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipe Mulet CLA 2007-10-30 11:50:55 EDT
Build 3.4M3

A warning got introduced to flag invocations of non-generic method with type argument syntax, but it doesn't show up for constructor invocations.

e.g. The following code should exhibit 3 warnings.

public class X {
	public X(String t){
		System.out.println(t);
	}
	public static void main(String[] args) {
		class Local extends X {
			Local() {
				<String>super("FAILED"); // warn?
			}
		};
		new <String>Local(); // warn?
		new <String>Local(){}; // warn?
	}
}
Comment 1 Philipe Mulet CLA 2007-10-30 12:32:54 EDT
Added GenericTypeTest#test1211 (and tuned pre-existing ones)
Comment 2 Philipe Mulet CLA 2007-10-30 12:34:06 EDT
Also added IProblem#UnusedTypeArgumentsForConstructorInvocation
Comment 3 Philipe Mulet CLA 2007-11-02 07:28:01 EDT
Released for 3.4M4.
Fixed
Comment 4 Kent Johnson CLA 2007-12-11 11:59:49 EST
Verified for 3.4M4 using build I20071210-1800.