Files
kotlin-fork/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/exactAnnotation.fir.kt
T
Nikita Bobko 052baf1b04 Revert "[FIR] Enable ForbidInferringTypeVariablesIntoEmptyIntersection in 2.0"
^KT-66196 Fixed
Keep it a warning in 2.0

This reverts commit be232d3e6f.
2024-02-28 18:08:11 +00:00

12 lines
354 B
Kotlin
Vendored

//!DIAGNOSTICS: -UNUSED_VARIABLE
@Suppress("INVISIBLE_MEMBER", <!ERROR_SUPPRESSION!>"INVISIBLE_REFERENCE"<!>)
fun <T, U: T> List<@kotlin.internal.Exact T>.firstTyped(): U = throw Exception()
fun test1(l: List<Number>) {
val i: Int = l.firstTyped()
val s: String = l.<!INFERRED_TYPE_VARIABLE_INTO_EMPTY_INTERSECTION_WARNING!>firstTyped<!>()
}