mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-17 21:15:58 +07:00
GuessManagerImpl: support type constrains from DFA, various improvements
Partially fixes IDEA-181794 Suggest completion items with type casts in stream chains if there exists 'filter(x -> x instanceof Foo)' call Fixes IDEA-182455 Code completion: resolve actual value type assigned to local variable
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
class Foo {
|
||||
void test(String s) {
|
||||
Object x;
|
||||
x = s;
|
||||
System.out.println(x.subst<caret>);
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
class Foo {
|
||||
void test(String s) {
|
||||
Object x;
|
||||
x = s;
|
||||
System.out.println(((String) x).substring());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
class Foo {
|
||||
void test(String s) {
|
||||
Object x = s;
|
||||
System.out.println(x.subst<caret>);
|
||||
}
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
class Foo {
|
||||
void test(String s) {
|
||||
Object x = s;
|
||||
System.out.println(((String) x).substring());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
import java.util.*;
|
||||
|
||||
class Foo {
|
||||
void test(Optional<Object> opt) {
|
||||
opt.filter(x -> x instanceof String)
|
||||
.map(s -> s.subst<caret>)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
import java.util.*;
|
||||
|
||||
class Foo {
|
||||
void test(Optional<Object> opt) {
|
||||
opt.filter(x -> x instanceof String)
|
||||
.map(s -> ((String) s).substring())
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import java.util.*;
|
||||
|
||||
class Foo {
|
||||
void test(List<?> obj) {
|
||||
obj.stream()
|
||||
.filter(x -> x instanceof String)
|
||||
.forEach(e -> e.subst<caret>);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import java.util.*;
|
||||
|
||||
class Foo {
|
||||
void test(List<?> obj) {
|
||||
obj.stream()
|
||||
.filter(x -> x instanceof String)
|
||||
.forEach(e -> ((String) e).substring());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user