aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/bugs1612/pr339974/City.java7
-rw-r--r--tests/bugs1612/pr339974/TrafficCalculator.java20
-rw-r--r--tests/bugs1612/pr342605/Code.java5
-rw-r--r--tests/src/org/aspectj/systemtest/ajc1612/Ajc1612Tests.java8
-rw-r--r--tests/src/org/aspectj/systemtest/ajc1612/ajc1612.xml10
5 files changed, 50 insertions, 0 deletions
diff --git a/tests/bugs1612/pr339974/City.java b/tests/bugs1612/pr339974/City.java
new file mode 100644
index 000000000..60ba5a15b
--- /dev/null
+++ b/tests/bugs1612/pr339974/City.java
@@ -0,0 +1,7 @@
+public class City {
+
+ private String name;
+
+ private Country country;
+}
+class Country {}
diff --git a/tests/bugs1612/pr339974/TrafficCalculator.java b/tests/bugs1612/pr339974/TrafficCalculator.java
new file mode 100644
index 000000000..398e47bca
--- /dev/null
+++ b/tests/bugs1612/pr339974/TrafficCalculator.java
@@ -0,0 +1,20 @@
+public aspect TrafficCalculator {
+
+ public static class City.TrafficCalculator {
+ Function<City, Time> EXTREME = createExtremeTraffic();
+ Function<City, Time> BASIC = createBasicTraffic();
+ }
+
+
+ private static Function<City, Time> createExtremeTraffic() {
+ return null;
+ }
+ private static Function<City, Time> createBasicTraffic() {
+ return null;
+ }
+
+ public static class Time { }
+
+
+}
+class Function<A,B> {}
diff --git a/tests/bugs1612/pr342605/Code.java b/tests/bugs1612/pr342605/Code.java
new file mode 100644
index 000000000..3d3b790d4
--- /dev/null
+++ b/tests/bugs1612/pr342605/Code.java
@@ -0,0 +1,5 @@
+import this.is.Madeup;
+
+public class Code {
+ public static void main(String []argv) {}
+}
diff --git a/tests/src/org/aspectj/systemtest/ajc1612/Ajc1612Tests.java b/tests/src/org/aspectj/systemtest/ajc1612/Ajc1612Tests.java
index 3a1156f42..26140e933 100644
--- a/tests/src/org/aspectj/systemtest/ajc1612/Ajc1612Tests.java
+++ b/tests/src/org/aspectj/systemtest/ajc1612/Ajc1612Tests.java
@@ -21,6 +21,14 @@ import org.aspectj.testing.XMLBasedAjcTestCase;
*/
public class Ajc1612Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
+ public void testItitNpe_339974() {
+ runTest("itit npe");
+ }
+
+// public void testNoImportError_342605() {
+// runTest("noimporterror");
+// }
+
public void testClashingLocalTypes_342323() {
runTest("clashing local types");
}
diff --git a/tests/src/org/aspectj/systemtest/ajc1612/ajc1612.xml b/tests/src/org/aspectj/systemtest/ajc1612/ajc1612.xml
index d8895fecc..49b27f558 100644
--- a/tests/src/org/aspectj/systemtest/ajc1612/ajc1612.xml
+++ b/tests/src/org/aspectj/systemtest/ajc1612/ajc1612.xml
@@ -2,6 +2,16 @@
<suite>
+<ajc-test dir="bugs1612/pr339974" title="itit npe">
+<compile files="City.java TrafficCalculator.java" options="-1.5">
+<message kind="error" text="The nested type TrafficCalculator cannot hide an enclosing type"/>
+</compile>
+</ajc-test>
+
+<ajc-test dir="bugs1612/pr342605" title="noimporterror">
+<compile files="Code.java" options="-1.5 -noImportError"/>
+<run class="Code"/>
+</ajc-test>
<ajc-test dir="bugs1612/pr342323" title="clashing local types">
<compile files="Runner.java Bean.java Azpect.java" options="-1.5"/>