summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/bugs152/pr136393/World.aj23
-rw-r--r--tests/src/org/aspectj/systemtest/ajc152/ajc152.xml7
2 files changed, 30 insertions, 0 deletions
diff --git a/tests/bugs152/pr136393/World.aj b/tests/bugs152/pr136393/World.aj
new file mode 100644
index 000000000..2fcc4bc51
--- /dev/null
+++ b/tests/bugs152/pr136393/World.aj
@@ -0,0 +1,23 @@
+package hello;
+
+public aspect World {
+ pointcut greeting():
+ execution(* Hello.sayHello(..));
+ after() returning: greeting() {
+ System.out.println(" World!");
+ }
+
+ String.new(Hello c) {
+ this(h.sayHell());
+ }
+
+ private static void main(String[] args) {
+ String s = new String(new Hello());
+ Stystems.substring(0);
+ }
+
+}
+
+class Hello {
+ public void sayHell() {}
+} \ No newline at end of file
diff --git a/tests/src/org/aspectj/systemtest/ajc152/ajc152.xml b/tests/src/org/aspectj/systemtest/ajc152/ajc152.xml
index 9e193b67e..abcf47c50 100644
--- a/tests/src/org/aspectj/systemtest/ajc152/ajc152.xml
+++ b/tests/src/org/aspectj/systemtest/ajc152/ajc152.xml
@@ -223,4 +223,11 @@
</run>
</ajc-test>
+ <ajc-test dir="bugs152/pr136393" title="NPE in makePreMethod">
+ <compile files="World.aj" options="-1.5">
+ <message kind="warning" line="10" text="this affected type is not exposed to the weaver: java.lang.String [Xlint:typeNotExposedToWeaver]"/>
+ <message kind="error" line="11" text="h cannot be resolved"/>
+ <message kind="error" line="16" text="Stystems cannot be resolved"/>
+ </compile>
+ </ajc-test>
</suite> \ No newline at end of file