--- /dev/null
+/**
+ *
+ */
+package none;
+
+/**
+ * @author Dawid Pytel
+ *
+ */
+public aspect ConcreteAspect extends GenericAspect<String> {
+
+ public static void main(String [] argv) {
+ new C();
+ }
+
+
+ before(SomeInterface v): SomeConstructor(v) {
+ System.out.println("Building an object "+v.getClass());
+ }
+}
+
+class C implements GenericAspect.SomeInterface {
+ public C() {
+ System.out.println("C.init");
+ }
+}
--- /dev/null
+/**
+ *
+ */
+package none;
+
+/**
+ * @author Dawid Pytel
+ *
+ */
+public abstract aspect GenericAspect<T> {
+
+ interface SomeInterface {
+ }
+
+ pointcut SomeConstructor(SomeInterface var) : execution(SomeInterface+.new(..)) && this(var);
+}
runTest("generics aspects npe");
}
+ public void testGenericAspectsNpe_pr268710() {
+ runTest("generics aspects incorrect error");
+ }
+
public void testGenericsItdNpe_pr267559() {
runTest("generics and itd npe");
}
<suite>
+ <ajc-test dir="bugs164/pr268710" title="generics aspects incorrect error">
+ <compile files="GenericAspect.aj ConcreteAspect.aj" options="-1.5"/>
+ <run class="none.ConcreteAspect">
+ <stdout>
+ <line text="Building an object class none.C"/>
+ <line text="C.init"/>
+ </stdout>
+ </run>
+ </ajc-test>
+
<ajc-test dir="bugs164/pr268689" title="generics aspects npe">
- <compile files="GenericAspect.aj ConcreteAspect.aj" options="-1.5">
- <message kind="error" line="15" text="parameterized types not supported for this and target pointcuts (erasure limitation)"/>
- </compile>
+ <compile files="GenericAspect.aj ConcreteAspect.aj" options="-1.5"/>
</ajc-test>
<ajc-test dir="bugs164/pr267559" title="generics and itd npe">