Browse Source

272233: test and fix, using 'void<?>'

tags/V1_6_5
aclement 15 years ago
parent
commit
43d34f58ff

+ 21
- 0
tests/bugs165/pr272233/Iffy.java View File

@@ -0,0 +1,21 @@
import java.util.*;
import org.aspectj.lang.annotation.*;

@Aspect
class A {
@Pointcut("execution(!void<?>[] *(..))")
void pointCutError() {}

@Before("pointCutError()")
public void m() {}
}


public class Iffy {


public Collection<?>[] getCollectionArray() {
return null;
}

}

+ 16
- 0
tests/bugs165/pr272233/Iffy2.java View File

@@ -0,0 +1,16 @@
import java.util.*;
import org.aspectj.lang.annotation.*;

@Aspect
class Iffy2 {

@Before("execution(!void[] *(..))")
public void advice1() {}

@Before("execution(!void[] *(..))")
public void advice2() {}

public Collection<?>[] getCollectionArray() {
return null;
}
}

+ 8
- 0
tests/src/org/aspectj/systemtest/ajc165/Ajc165Tests.java View File

@@ -20,6 +20,14 @@ import org.aspectj.weaver.LintMessage;

public class Ajc165Tests extends org.aspectj.testing.XMLBasedAjcTestCase {

public void testFunkyPointcut_pr272233() {
runTest("funky pointcut");
}

public void testFunkyPointcut_pr272233_2() {
runTest("funky pointcut 2");
}

public void testAnnotationStyle_pr265356() {
runTest("annotation style message positions");
List ms = ajc.getLastCompilationResult().getWarningMessages();

+ 13
- 0
tests/src/org/aspectj/systemtest/ajc165/ajc165.xml View File

@@ -2,6 +2,19 @@

<suite>

<ajc-test dir="bugs165/pr272233" title="funky pointcut">
<compile files="Iffy.java" options="-1.5">
<message kind="warning" text="void is not a generic type"/>
</compile>
</ajc-test>
<ajc-test dir="bugs165/pr272233" title="funky pointcut 2">
<compile files="Iffy2.java" options="-1.5 -showWeaveInfo">
<message kind="weave" text="advised by before advice from 'Iffy2' (Iffy2.java:11)"/>
<message kind="weave" text="advised by before advice from 'Iffy2' (Iffy2.java:8)"/>
</compile>
</ajc-test>
<ajc-test dir="bugs165/pr265356" title="annotation style message positions">
<compile files="Main.java" options="-1.5">
<message kind="warning" line="11"/>

Loading…
Cancel
Save