Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 356445

Summary: Ambiguous overloaded parameterized static method
Product: [Tools] AspectJ Reporter: Edwin de Jong <g.e.dejong>
Component: CompilerAssignee: aspectj inbox <aspectj-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: aclement, g.e.dejong
Version: 1.6.11   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Edwin de Jong CLA 2011-09-01 05:44:40 EDT
Build Identifier: Build id: 20110615-0604

The javacc will happily accept the code below, but the aspectj compiler refuses:

package foo;
public class MinimalReproduction
{
	public void test() { A.<Integer> m(1); }
	public static class A extends B {
		public static <E extends Comparable< ? >> void m(E arg)	{ return;	}
	}
	public static class B {
		public static <E> void m(E arg) { return; }
	}
}


This happens, for example, when using the Guava static method invocation: ImmutableSortedSet.<Integer> of(1,2,3);

Reproducible: Always
Comment 1 Andrew Clement CLA 2011-09-01 12:32:33 EDT
given that this is pure java code, first step would be to confirm what happens with Eclipse 3.3 JDT since that is the Eclipse compiler on which AspectJ is currently based.  If it works there, it is an AspectJ issue.  If it fails there it is a JDT bug that is likely fixed in a more recent Eclipse (would need to check that too, since the raise only mentions javac) and the fix will be picked up when AspectJ is rebased on eclipse 3.7.1 (to pick up Java7 support).