Browse Source

test for 136393

tags/V1_5_2rc1
aclement 18 years ago
parent
commit
6cc28740d0

+ 23
- 0
tests/bugs152/pr136393/World.aj View File

@@ -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() {}
}

+ 7
- 0
tests/src/org/aspectj/systemtest/ajc152/ajc152.xml View File

@@ -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>

Loading…
Cancel
Save