Allow empty type info for excl expressions
^KT-34515 Fixed
This commit is contained in:
committed by
teamcity
parent
b6f2513dd2
commit
7e491edf95
+6
@@ -4942,6 +4942,12 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag
|
||||
runTest("compiler/testData/diagnostics/tests/collectionLiterals/defaultValuesWithConstantsInAnnotation.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt34515.kt")
|
||||
public void testKt34515() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/collectionLiterals/kt34515.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("noCollectionLiterals.kt")
|
||||
public void testNoCollectionLiterals() throws Exception {
|
||||
|
||||
+6
@@ -4942,6 +4942,12 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti
|
||||
runTest("compiler/testData/diagnostics/tests/collectionLiterals/defaultValuesWithConstantsInAnnotation.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt34515.kt")
|
||||
public void testKt34515() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/collectionLiterals/kt34515.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("noCollectionLiterals.kt")
|
||||
public void testNoCollectionLiterals() throws Exception {
|
||||
|
||||
+6
@@ -4942,6 +4942,12 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac
|
||||
runTest("compiler/testData/diagnostics/tests/collectionLiterals/defaultValuesWithConstantsInAnnotation.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt34515.kt")
|
||||
public void testKt34515() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/collectionLiterals/kt34515.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("noCollectionLiterals.kt")
|
||||
public void testNoCollectionLiterals() throws Exception {
|
||||
|
||||
+3
-1
@@ -861,7 +861,9 @@ public class BasicExpressionTypingVisitor extends ExpressionTypingVisitor {
|
||||
context.trace.report(diagnosticFactory.on(operationSign));
|
||||
return baseTypeInfo != null ? baseTypeInfo : components.expressionTypingServices.getTypeInfo(baseExpression, context);
|
||||
}
|
||||
assert baseTypeInfo != null : "Base expression was not processed: " + expression;
|
||||
if (baseTypeInfo == null) {
|
||||
return TypeInfoFactoryKt.noTypeInfo(context);
|
||||
}
|
||||
KotlinType baseType = baseTypeInfo.getType();
|
||||
if (baseType == null) {
|
||||
return baseTypeInfo;
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
fun main() {
|
||||
<!UNSUPPORTED!>[]<!><!UNNECESSARY_NOT_NULL_ASSERTION!>!!<!>!!
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fun main() {
|
||||
<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, UNSUPPORTED!>[]<!>!!<!UNNECESSARY_NOT_NULL_ASSERTION!>!!<!>
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
package
|
||||
|
||||
public fun main(): kotlin.Unit
|
||||
Generated
+6
@@ -4948,6 +4948,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
||||
runTest("compiler/testData/diagnostics/tests/collectionLiterals/defaultValuesWithConstantsInAnnotation.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt34515.kt")
|
||||
public void testKt34515() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/collectionLiterals/kt34515.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("noCollectionLiterals.kt")
|
||||
public void testNoCollectionLiterals() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user