KT-2758 Errors in lazy resolve: Unknown TYPEDEF
Unknown declaration: TYPEDEF: Unknown declaration: TYPEDEF #KT-2758 Fixed EA-38287 Fixed
This commit is contained in:
@@ -245,6 +245,9 @@ public abstract class AbstractLazyMemberScope<D extends DeclarationDescriptor, D
|
||||
getProperties(name);
|
||||
}
|
||||
}
|
||||
else if (declaration instanceof JetTypedef) {
|
||||
// Do nothing as typedefs are not supported
|
||||
}
|
||||
else {
|
||||
throw new IllegalArgumentException("Unsupported declaration kind: " + declaration);
|
||||
}
|
||||
|
||||
+1
-1
@@ -64,7 +64,7 @@ public abstract class AbstractPsiBasedDeclarationProvider implements Declaration
|
||||
JetClassOrObject classOrObject = (JetClassOrObject) declaration;
|
||||
classesAndObjects.put(classOrObject.getNameAsName(), classOrObject);
|
||||
}
|
||||
else if (declaration instanceof JetParameter) {
|
||||
else if (declaration instanceof JetParameter || declaration instanceof JetTypedef) {
|
||||
// Do nothing, just put it into allDeclarations is enough
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
class TestClassName
|
||||
type TestAlias = TestClassName
|
||||
|
||||
val a: Tes<caret>
|
||||
|
||||
// Regression for EA-38287 and KT-2758
|
||||
|
||||
// EXIST: TestClassName
|
||||
// ABSENT: TestAlias
|
||||
@@ -100,6 +100,10 @@ public class JetBasicCompletionTest extends JetCompletionTestBase {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testInFileWithTypedef() {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testInFunInClassInitializer() {
|
||||
doTest();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user