@@ -0,0 +1,7 @@ | |||
public class City { | |||
private String name; | |||
private Country country; | |||
} | |||
class Country {} |
@@ -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> {} |
@@ -0,0 +1,5 @@ | |||
import this.is.Madeup; | |||
public class Code { | |||
public static void main(String []argv) {} | |||
} |
@@ -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"); | |||
} |
@@ -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"/> |