Debian Codegraph @

framework/tests/all-systems/GenericsEnclosing.java

raw
1 import java.util.TreeMap;
2
3 /**
4 * Resolution of outer classes must take substitution of generic types into account. Thanks to EMS
5 * for finding this problem.
6 *
7 * <p>Also see regex/GenericsEnclosing for a test case for the Regex Checker.
8 */
9 class GenericsEnclosing extends TreeMap<String, String> {
10 class Inner {
11 void foo() {
12 put("string", "string".toString());
13 put("string", "string");
14 GenericsEnclosing.this.put("string", "string".toString());
15 GenericsEnclosing.this.put("string", "string");
16 }
17 }
18 }
19
20 class OtherUse {
21 void m(GenericsEnclosing p) {
22 p.put("string", "string".toString());
23 p.put("string", "string");
24 }
25 }