fixed an exception from 'getConstructorReferenceExpression'
(from exception analyzer)
This commit is contained in:
+1
-2
@@ -37,10 +37,9 @@ public class JetConstructorCalleeExpression extends JetExpressionImpl {
|
||||
return null;
|
||||
}
|
||||
JetTypeElement typeElement = typeReference.getTypeElement();
|
||||
if (typeElement == null) {
|
||||
if (!(typeElement instanceof JetUserType)) {
|
||||
return null;
|
||||
}
|
||||
assert typeElement instanceof JetUserType : typeElement;
|
||||
return ((JetUserType) typeElement).getReferenceExpression();
|
||||
}
|
||||
|
||||
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
package typeReferenceError
|
||||
|
||||
class <!ABSTRACT_MEMBER_NOT_IMPLEMENTED!>Pair<!><<!SYNTAX!><!>:(val c: <!SYNTAX!><!SYNTAX!><!>fun<!><!SYNTAX!><!> <!UNRESOLVED_REFERENCE!>main<!>()
|
||||
|
||||
@@ -1949,6 +1949,11 @@ public class JetDiagnosticsTestGenerated extends AbstractDiagnosticsTestWithEage
|
||||
doTest("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/namedFun.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("typeReferenceError.kt")
|
||||
public void testTypeReferenceError() throws Exception {
|
||||
doTest("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/typeReferenceError.kt");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static Test innerSuite() {
|
||||
|
||||
Reference in New Issue
Block a user