Bug 356445 - Ambiguous overloaded parameterized static method
Summary: Ambiguous overloaded parameterized static method
Status: NEW
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: 1.6.11   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-01 05:44 EDT by Edwin de Jong CLA
Modified: 2011-09-01 12:32 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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).