mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 03:13:40 +07:00
erasure method call type if unchecked assignment was applied during applicability check (IDEA-67862)
(cherry picked from commit f106f813559768f90952caac6a2eec4cfeed7103)
This commit is contained in:
+22
@@ -0,0 +1,22 @@
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
class Main1 {
|
||||
static <T> Collection<Collection<T>> foo(Collection<Collection<T>> x) { return x; }
|
||||
|
||||
public static void main(String[] args) {
|
||||
List x = null;
|
||||
foo(x).iterator().next().<error descr="Cannot resolve method 'iterator()'">iterator</error>();
|
||||
}
|
||||
}
|
||||
|
||||
class Main {
|
||||
static <T> List<String> foo(Collection<String> x) { return null; }
|
||||
|
||||
public static void main(String[] args) {
|
||||
List x = null;
|
||||
<error descr="Incompatible types. Found: 'java.lang.Object', required: 'java.lang.String'">String s = foo(x).get(0);</error>
|
||||
foo(x).iterator().next().<error descr="Cannot resolve method 'toLowerCase()'">toLowerCase</error>();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user