[FIR] Implement NULL_FOR_NONNULL_TYPE diagnostics, fix tests
This commit is contained in:
+1
-1
@@ -27,7 +27,7 @@ fun foo(expr: StringBuilder): Int {
|
||||
|
||||
fun unitShort() : Unit = Unit
|
||||
fun unitShortConv() : Unit = <error descr="[RETURN_TYPE_MISMATCH] Return type mismatch: expected kotlin/Unit, actual kotlin/Int">1</error>
|
||||
fun unitShortNull() : Unit = <error descr="[RETURN_TYPE_MISMATCH] Return type mismatch: expected kotlin/Unit, actual kotlin/Nothing?">null</error>
|
||||
fun unitShortNull() : Unit = <error descr="[NULL_FOR_NONNULL_TYPE] ">null</error>
|
||||
|
||||
fun intEmpty() : Int {}
|
||||
fun intShortInfer() = 1
|
||||
|
||||
+2
-2
@@ -3,8 +3,8 @@ package test
|
||||
|
||||
annotation class A(val value: String)
|
||||
|
||||
@A(<error descr="[ARGUMENT_TYPE_MISMATCH] Argument type mismatch: actual type is kotlin/Nothing? but kotlin/String was expected">null</error>)
|
||||
@A(<error descr="[NULL_FOR_NONNULL_TYPE] ">null</error>)
|
||||
fun foo() {}
|
||||
|
||||
@A(<error descr="[ARGUMENT_TYPE_MISMATCH] Argument type mismatch: actual type is kotlin/Nothing? but kotlin/String was expected">null</error>)
|
||||
@A(<error descr="[NULL_FOR_NONNULL_TYPE] ">null</error>)
|
||||
class B
|
||||
|
||||
Reference in New Issue
Block a user