blob: 99b717356a6f8b8b390953d0aa3987dd7322a26a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
// version :9
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>();
val elem = list.get(0);
}
public void testLocalClasses() {
class Local<A> {}
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()) {
}
}
}
|