FE: add tests for KT-53966 (positive/negative)

This commit is contained in:
Mikhail Glukhikh
2023-01-19 12:46:22 +01:00
committed by Space Team
parent 12a083af25
commit 5a9e8b3c0a
12 changed files with 110 additions and 0 deletions
@@ -0,0 +1,14 @@
fun main() {
val flag = true
consumeTicker(
if (flag) null else <!ARGUMENT_TYPE_MISMATCH!>{ num -> num.<!UNRESOLVED_REFERENCE!>dec<!>() }<!>
)
}
fun consumeTicker(ticker: Ticker?) {
}
fun interface Ticker {
fun tick(num: Int)
}
@@ -0,0 +1,14 @@
fun main() {
val flag = true
consumeTicker(
if (flag) null else { num -> num.dec() }
)
}
fun consumeTicker(ticker: Ticker?) {
}
fun interface Ticker {
fun tick(num: Int)
}
@@ -0,0 +1,11 @@
package
public fun consumeTicker(/*0*/ ticker: Ticker?): kotlin.Unit
public fun main(): kotlin.Unit
public fun interface Ticker {
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public abstract fun tick(/*0*/ num: kotlin.Int): kotlin.Unit
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}