mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 15:27:45 +07:00
prefer T if Class<? extends T> is expected (IDEA-121339)
This commit is contained in:
+12
@@ -0,0 +1,12 @@
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Foo {
|
||||
{
|
||||
foo(X<caret>)
|
||||
}
|
||||
|
||||
void foo(Class<? extends Throwable> c) {}
|
||||
}
|
||||
|
||||
interface XIntf {}
|
||||
class XClass {}
|
||||
+5
@@ -620,6 +620,11 @@ interface TxANotAnno {}
|
||||
checkPreferredItems 0, 'MyEnum.BAR', 'MyEnum', 'MyEnum.FOO'
|
||||
}
|
||||
|
||||
public void testPreferClassesOfExpectedClassType() {
|
||||
myFixture.addClass "class XException extends Exception {}"
|
||||
checkPreferredItems 0, 'XException', 'XClass', 'XIntf'
|
||||
}
|
||||
|
||||
public void testGlobalStaticMemberStats() {
|
||||
configureNoCompletion(getTestName(false) + ".java")
|
||||
myFixture.complete(CompletionType.BASIC, 2)
|
||||
|
||||
Reference in New Issue
Block a user