[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:
+1
-1
@@ -12,7 +12,7 @@ annotation class Ann
|
||||
fun <@Ann R : @Ann Any> f3(a: Array<@Ann R>): Array<@Ann R?> = null!!
|
||||
|
||||
fun test2(a: @Ann Array<in @Ann Int>) {
|
||||
val r: Array<in Int?> = f3(<!ARGUMENT_TYPE_MISMATCH("kotlin/Array<@R|Ann|() R>; @R|Ann|() kotlin/Array<in @R|Ann|() kotlin/Int>")!>a<!>)
|
||||
val r: Array<in Int?> = f3(<!ARGUMENT_TYPE_MISMATCH("kotlin/Array<@R|Ann|() R>; @R|Ann|() kotlin/Array<CapturedType(in @R|Ann|() kotlin/Int)>")!>a<!>)
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user