[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:
@@ -11,7 +11,7 @@ compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.kt:2:74: error: cannot a
|
||||
compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.kt:7:20: error: 'this' is not defined in this context
|
||||
class B(other: B = this)
|
||||
^
|
||||
compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.kt:10:32: error: argument type mismatch: actual type is kotlin/Function0<ERROR CLASS: Cannot access ''<this>'' before the instance has been initialized> but kotlin/Int was expected
|
||||
compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.kt:10:32: error: argument type mismatch: actual type is kotlin/Function0<ERROR CLASS: Unknown return lambda parameter type> but kotlin/Int was expected
|
||||
constructor(x: Int) : this({
|
||||
^
|
||||
compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.kt:12:9: error: cannot access '<this>' before the instance has been initialized
|
||||
|
||||
Reference in New Issue
Block a user