182 variable("String", "$2"), |
183 variable("String", "$2"), |
183 variable("String", "$3")); |
184 variable("String", "$3")); |
184 assertActiveKeys(); |
185 assertActiveKeys(); |
185 } |
186 } |
186 |
187 |
|
188 public void variablesTemporaryArrayOfCapturedType() { |
|
189 assertEval("class Test<T> { T[][] get() { return null; } }", added(VALID)); |
|
190 assertEval("Test<? extends String> test() { return new Test<>(); }", added(VALID)); |
|
191 assertEval("test().get()", added(VALID)); |
|
192 assertVariables(variable("String[][]", "$1")); |
|
193 assertEval("\"\".getClass().getEnumConstants()", added(VALID)); |
|
194 assertVariables(variable("String[][]", "$1"), variable("String[]", "$2")); |
|
195 assertActiveKeys(); |
|
196 } |
|
197 |
187 public void variablesClassReplace() { |
198 public void variablesClassReplace() { |
188 assertEval("import java.util.*;", added(VALID)); |
199 assertEval("import java.util.*;", added(VALID)); |
189 Snippet var = varKey(assertEval("List<Integer> list = new ArrayList<>();", "[]", |
200 Snippet var = varKey(assertEval("List<Integer> list = new ArrayList<>();", "[]", |
190 added(VALID))); |
201 added(VALID))); |
191 assertVariables(variable("List<Integer>", "list")); |
202 assertVariables(variable("List<Integer>", "list")); |