mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-10 18:09:38 +07:00
insert instance of|cast when condition contains intersection with instanceof (IDEA-64776)
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
// "Insert '(String)o' declaration" "true"
|
||||
class C {
|
||||
void f(Object o, Object f) {
|
||||
if (o instanceof String && f == null) {
|
||||
String s = (String) o;
|
||||
<caret>
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Insert '(String)o' declaration" "true"
|
||||
class C {
|
||||
void f(Object o, Object f) {
|
||||
if (o instanceof String && f == null) {
|
||||
<caret>
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Insert '(String)o' declaration" "false"
|
||||
class C {
|
||||
void f(Object o, Object f) {
|
||||
if (o instanceof String || f == null) {
|
||||
<caret>
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Insert '(String)o' declaration" "false"
|
||||
class C {
|
||||
void f(Object o, Object f) {
|
||||
if (o instanceof String && f instanceof String) {
|
||||
<caret>
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user