mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 06:05:01 +07:00
IDEA-68584 Completion should detect return type and autocast in some cases
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import java.lang.Object;
|
||||
|
||||
class IFoo {
|
||||
Object getValue() {}
|
||||
}
|
||||
|
||||
class Foo extends IFoo {
|
||||
Foo getValue() {}
|
||||
void foo(IFoo o) {
|
||||
if (o instanceof Foo) {
|
||||
o.getv<caret>x
|
||||
}
|
||||
}
|
||||
}
|
||||
+8
@@ -1300,4 +1300,12 @@ public class ListUtils {
|
||||
checkResult()
|
||||
}
|
||||
|
||||
public void testCastVisually() {
|
||||
configure()
|
||||
def p = LookupElementPresentation.renderElement(myFixture.lookupElements[0])
|
||||
assert p.itemText == 'getValue'
|
||||
assert p.itemTextBold
|
||||
assert p.typeText == 'Foo'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user