aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs191/var
diff options
context:
space:
mode:
Diffstat (limited to 'tests/bugs191/var')
-rw-r--r--tests/bugs191/var/Code1.java6
-rw-r--r--tests/bugs191/var/Code2.java11
-rw-r--r--tests/bugs191/var/Code3.java12
3 files changed, 29 insertions, 0 deletions
diff --git a/tests/bugs191/var/Code1.java b/tests/bugs191/var/Code1.java
new file mode 100644
index 000000000..58f93d1ba
--- /dev/null
+++ b/tests/bugs191/var/Code1.java
@@ -0,0 +1,6 @@
+public class Code1 {
+ public static void main(String []argv) {
+ var x = "hello";
+ System.out.println(x.getClass());
+ }
+}
diff --git a/tests/bugs191/var/Code2.java b/tests/bugs191/var/Code2.java
new file mode 100644
index 000000000..7f8ba93b6
--- /dev/null
+++ b/tests/bugs191/var/Code2.java
@@ -0,0 +1,11 @@
+import java.util.*;
+public class Code2 {
+ public static void main(String []argv) {
+ foo(new ArrayList<String>());
+ }
+
+ public static void foo(ArrayList<String> als) {
+ var aly = als;
+ System.out.println(aly.getClass());
+ }
+}
diff --git a/tests/bugs191/var/Code3.java b/tests/bugs191/var/Code3.java
new file mode 100644
index 000000000..f2494bc6d
--- /dev/null
+++ b/tests/bugs191/var/Code3.java
@@ -0,0 +1,12 @@
+public class Code3 {
+ public static void main(String []argv) {
+ var x = "hello";
+ System.out.println(x.getClass());
+ }
+}
+
+aspect X {
+ before(): call(* *.getClass()) && target(String) {
+ System.out.println(thisJoinPointStaticPart);
+ }
+}