diff options
Diffstat (limited to 'test/transform/resource')
3 files changed, 41 insertions, 0 deletions
diff --git a/test/transform/resource/after-delombok/ValOutersWithGenerics.java b/test/transform/resource/after-delombok/ValOutersWithGenerics.java index 150e3a2a..901ad2f7 100644 --- a/test/transform/resource/after-delombok/ValOutersWithGenerics.java +++ b/test/transform/resource/after-delombok/ValOutersWithGenerics.java @@ -2,6 +2,8 @@ import java.util.*; public class ValOutersWithGenerics<Z> { class Inner { } + class InnerWithGenerics<H> { + } public void testOutersWithGenerics() { final java.lang.String foo = ""; List<Inner> list = new ArrayList<Inner>(); @@ -12,10 +14,19 @@ public class ValOutersWithGenerics<Z> { } final Local<java.lang.String> q = new Local<String>(); } + public static void test() { + final ValOutersWithGenerics<java.lang.String> outer = new ValOutersWithGenerics<String>(); + final ValOutersWithGenerics<java.lang.String>.Inner inner1 = outer.new Inner(); + final ValOutersWithGenerics<java.lang.String>.InnerWithGenerics<java.lang.Integer> inner2 = outer.new InnerWithGenerics<Integer>(); + } static class SubClass extends ValOutersWithGenerics<String> { public void testSubClassOfOutersWithGenerics() { List<Inner> list = new ArrayList<Inner>(); final ValOutersWithGenerics<java.lang.String>.Inner elem = list.get(0); } } + public static void loop(Map<String, String> map) { + for (final java.util.Map.Entry<java.lang.String, java.lang.String> e : map.entrySet()) { + } + } } diff --git a/test/transform/resource/after-ecj/ValOutersWithGenerics.java b/test/transform/resource/after-ecj/ValOutersWithGenerics.java index b4225ede..da16e7f8 100644 --- a/test/transform/resource/after-ecj/ValOutersWithGenerics.java +++ b/test/transform/resource/after-ecj/ValOutersWithGenerics.java @@ -6,6 +6,11 @@ public class ValOutersWithGenerics<Z> { super(); } } + class InnerWithGenerics<H> { + InnerWithGenerics() { + super(); + } + } static class SubClass extends ValOutersWithGenerics<String> { SubClass() { super(); @@ -31,4 +36,14 @@ public class ValOutersWithGenerics<Z> { } final @val Local<java.lang.String> q = new Local<String>(); } + public static void test() { + final @val ValOutersWithGenerics<java.lang.String> outer = new ValOutersWithGenerics<String>(); + final @val ValOutersWithGenerics<java.lang.String>.Inner inner1 = outer.new Inner(); + final @val ValOutersWithGenerics<java.lang.String>.InnerWithGenerics<java.lang.Integer> inner2 = outer.new InnerWithGenerics<Integer>(); + } + public static void loop(Map<String, String> map) { + for (final @val java.util.Map.Entry<java.lang.String, java.lang.String> e : map.entrySet()) + { + } + } } diff --git a/test/transform/resource/before/ValOutersWithGenerics.java b/test/transform/resource/before/ValOutersWithGenerics.java index 145f812c..1b29d37c 100644 --- a/test/transform/resource/before/ValOutersWithGenerics.java +++ b/test/transform/resource/before/ValOutersWithGenerics.java @@ -2,9 +2,13 @@ import java.util.*; import lombok.val; public class ValOutersWithGenerics<Z> { + class Inner { } + class InnerWithGenerics<H> { + } + public void testOutersWithGenerics() { val foo = ""; List<Inner> list = new ArrayList<Inner>(); @@ -17,10 +21,21 @@ public class ValOutersWithGenerics<Z> { val q = new Local<String>(); } + public static void test() { + val outer = new ValOutersWithGenerics<String>(); + val inner1 = outer.new Inner(); + val inner2 = outer.new InnerWithGenerics<Integer>(); + } + static class SubClass extends ValOutersWithGenerics<String> { public void testSubClassOfOutersWithGenerics() { List<Inner> list = new ArrayList<Inner>(); val elem = list.get(0); } } + + public static void loop(Map<String, String> map) { + for (val e : map.entrySet()) { + } + } } |