static imports: don't compare with expected type when it depends on unresolved reference (IDEA-163072)

This commit is contained in:
Anna.Kozlova
2017-03-31 18:00:13 +02:00
parent c3a6faa9df
commit 51d4e9936a
6 changed files with 43 additions and 5 deletions

View File

@@ -0,0 +1,18 @@
// "Import static method 'java.util.stream.Collectors.toList'" "true"
import java.util.stream.Stream;
import static java.util.stream.Collectors.toList;
public class X {
{
System.out.println(Stream.of(123, 456)
.map(i -> i + 1)
.collect(toList()));
}
}
class Y {
private static void toList() {}
}

View File

@@ -0,0 +1,16 @@
// "Import static method 'java.util.stream.Collectors.toList'" "true"
import java.util.stream.Stream;
public class X {
{
System.out.println(Stream.of(123, 456)
.map(i -> i + 1)
.collect(toLi<caret>st()));
}
}
class Y {
private static void toList() {}
}