[FIR] Report type-aliased 'Nothing' as return type

This warning was issued in K1, but lost in K2

^KT-59420 Fixed
^KT-59429 Fixed
This commit is contained in:
Alejandro Serrano Mena
2023-10-02 14:11:52 +02:00
committed by Space Team
parent f6b2c642c2
commit 310e89f100
10 changed files with 70 additions and 6 deletions
@@ -1,5 +0,0 @@
typealias N = Nothing
fun testFun(): N = null!!
val testVal: N = null!!
val testValWithGetter: N get() = null!!
@@ -1,5 +1,10 @@
// FIR_IDENTICAL
typealias N = Nothing
fun <!ABBREVIATED_NOTHING_RETURN_TYPE!>testFun<!>(): N = null!!
val <!ABBREVIATED_NOTHING_PROPERTY_TYPE!>testVal<!>: N = null!!
val <!ABBREVIATED_NOTHING_PROPERTY_TYPE!>testValWithGetter<!>: N get() = null!!
fun testFunN(): Nothing = null!!
val testValN: Nothing = null!!
val testValWithGetterN: Nothing get() = null!!
@@ -1,6 +1,9 @@
package
public val testVal: N /* = kotlin.Nothing */
public val testValN: kotlin.Nothing
public val testValWithGetter: N /* = kotlin.Nothing */
public val testValWithGetterN: kotlin.Nothing
public fun testFun(): N /* = kotlin.Nothing */
public fun testFunN(): kotlin.Nothing
public typealias N = kotlin.Nothing