diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ajcTests.xml | 11 | ||||
-rw-r--r-- | tests/bugs/StringToString/HW.java | 28 | ||||
-rw-r--r-- | tests/bugs/StringToString/X.java | 10 | ||||
-rw-r--r-- | tests/bugs/StringToString/helloworld.jar | bin | 0 -> 1019 bytes |
4 files changed, 49 insertions, 0 deletions
diff --git a/tests/ajcTests.xml b/tests/ajcTests.xml index ce4620ece..3a86750e5 100644 --- a/tests/ajcTests.xml +++ b/tests/ajcTests.xml @@ -7523,4 +7523,15 @@ <compile files="Priority.aj" /> </ajc-test> + <ajc-test dir="bugs/StringToString" pr="55341" + title="error Type mismatch: cannot convert from java.lang.String to java.lang.String" + comment="make helloworld.jar with 'ajc -outjar helloworld.jar HW.java' or run BcweaverJarMaker" + keywords=""> + <compile files="X.java" classpath="helloworld.jar"> + <message kind="warning" line="3"/> + <message kind="warning" line="7"/> + </compile> + </ajc-test> + + </suite> diff --git a/tests/bugs/StringToString/HW.java b/tests/bugs/StringToString/HW.java new file mode 100644 index 000000000..66eeca22c --- /dev/null +++ b/tests/bugs/StringToString/HW.java @@ -0,0 +1,28 @@ + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.Properties; + +public class HW extends ArrayList { + + String message = "Hello World!"; + + private void check (String args) { + } + + public void println () { + System.out.println(message); + } + + public static void main(String[] args) { + HW hw = new HW(); + hw.println(); + for (int i = 0; i < args.length; i++) { + String jp = args[i]; + if (!hw.contains(jp)) { + throw new RuntimeException(jp + " missing"); + } + } + } + +} diff --git a/tests/bugs/StringToString/X.java b/tests/bugs/StringToString/X.java new file mode 100644 index 000000000..9ef81978c --- /dev/null +++ b/tests/bugs/StringToString/X.java @@ -0,0 +1,10 @@ +// PR55341 +aspect F { + private int HW.intField = 999; +} + +aspect M { + public String HW.getMessage () { + return message; + } +} diff --git a/tests/bugs/StringToString/helloworld.jar b/tests/bugs/StringToString/helloworld.jar Binary files differnew file mode 100644 index 000000000..185b8eb2b --- /dev/null +++ b/tests/bugs/StringToString/helloworld.jar |