Skip to content

Commit

Permalink
Fix for #763: spread-dot penetrates multiple layers of collection types
Browse files Browse the repository at this point in the history
- also map*.x applies to entrySet() and [map,map]*.x applies to Map
  • Loading branch information
eric-milles committed Nov 17, 2018
1 parent 9f0429a commit 7a8487d
Show file tree
Hide file tree
Showing 9 changed files with 520 additions and 402 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,18 @@ public void testArrayGenerics2() {
assertExprType(contents, "Map", "java.util.Map<java.lang.String,java.util.regex.Pattern>");
}

@Test // https://github.com/groovy/groovy-eclipse/issues/763
public void testArrayGenerics3() {
String contents = "Collection<List<String>>[] array = []; array*.trim()";
assertExprType(contents, "trim", "java.lang.String");
}

@Test
public void testArrayGenerics4() {
String contents = "Map<String, ?>[] array = [[val:1]]; array*.val";
assertExprType(contents, "val", "java.lang.Object");
}

@Test
public void testArrayProperty1() {
createUnit("XX", "class XX { XX[] xx; XX yy; }");
Expand Down
Loading

0 comments on commit 7a8487d

Please sign in to comment.