[FIR] Display actual type for argument type mismatch error

Previously the argument type was being used for the actual type error
display. However, safe-call arguments are unwrapped which causes
nullable types to be displayed as non-null. Change to use the actual
type provided by the diagnostic instead of extracting the type from
the argument.

#KT-58844 Fixed
This commit is contained in:
Brian Norman
2023-06-15 08:25:22 -05:00
committed by Space Team
parent a7ff0cfc9d
commit 269dfc61c8
10 changed files with 57 additions and 3 deletions
@@ -22744,6 +22744,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
runTest("compiler/testData/diagnostics/tests/nullableTypes/inferenceFlexibleTToNullable.kt");
}
@Test
@TestMetadata("kt58844.kt")
public void testKt58844() throws Exception {
runTest("compiler/testData/diagnostics/tests/nullableTypes/kt58844.kt");
}
@Test
@TestMetadata("nullAssertOnTypeWithNullableUpperBound.kt")
public void testNullAssertOnTypeWithNullableUpperBound() throws Exception {
@@ -22744,6 +22744,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
runTest("compiler/testData/diagnostics/tests/nullableTypes/inferenceFlexibleTToNullable.kt");
}
@Test
@TestMetadata("kt58844.kt")
public void testKt58844() throws Exception {
runTest("compiler/testData/diagnostics/tests/nullableTypes/kt58844.kt");
}
@Test
@TestMetadata("nullAssertOnTypeWithNullableUpperBound.kt")
public void testNullAssertOnTypeWithNullableUpperBound() throws Exception {