mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-17 20:11:25 +07:00
[java-incomplete-model] Assume that any unresolved class-type is assignable to java.lang.Object
Partially improves inference in incomplete mode GitOrigin-RevId: 1d9c7c75afd524ea02980be8f96c19fba1eaaf54
This commit is contained in:
committed by
intellij-monorepo-bot
parent
5835df8dd6
commit
838cf2d73c
@@ -1,14 +0,0 @@
|
||||
// "Cast argument to 'Map<Foo, Bar>'" "true-preview"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
class X {
|
||||
void run(Foo single) {}
|
||||
void run(Map<Foo, Bar> map) {}
|
||||
|
||||
void test(Bar bar) {
|
||||
run((Map<Foo, Bar>) Collections.singletonMap(getFoo(), bar));
|
||||
}
|
||||
|
||||
native Foo getFoo();
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
// "Cast argument to 'Map<Foo, Bar>'" "true-preview"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
class X {
|
||||
void run(Foo single) {}
|
||||
void run(Map<Foo, Bar> map) {}
|
||||
|
||||
void test(Bar bar) {
|
||||
run((Map<Foo, Bar>) Collections.singletonMap(getFoo(), bar));
|
||||
}
|
||||
|
||||
native Foo getFoo();
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Cast argument to 'Map<Foo, Bar>'" "true-preview"
|
||||
// "Cast argument to 'Map<Foo, Bar>'" "false"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Cast argument to 'Map<Foo, Bar>'" "true-preview"
|
||||
// "Cast argument to 'Map<Foo, Bar>'" "false"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ public class Test {
|
||||
public static void main(String[] args) {
|
||||
for (String module : args) {
|
||||
VirtualFile[] sourceRoots = foo(module);
|
||||
Arrays.stream(sourceRoots).forEach((VirtualFile sourceRoot) -> sourceRoot.substring());
|
||||
Arrays.stream(sourceRoots).forEach(sourceRoot -> sourceRoot.substring());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ public class Main {
|
||||
|
||||
// Unresolved reference
|
||||
void f(Collection<? extends Foo> c) {
|
||||
R treeSet = new TreeSet();
|
||||
TreeSet treeSet = new TreeSet();
|
||||
for (Foo foo : c) {
|
||||
treeSet.add(foo);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user