Files
kotlin-fork/compiler/testData/diagnostics/testsWithStdLib/builderInference/upperBoundViolation.fir.kt
T
Simon Ogorodnik 2f367b013a K2: Don't lose constraint errors in the builder inference session
Pass constraint errors from the integration system into a candidate to
make sure it is reported later.

Related to KT-59426, KT-59437, KT-53749
#KT-55168 Submitted
2023-12-04 15:27:20 +00:00

12 lines
289 B
Kotlin
Vendored

// !RENDER_DIAGNOSTICS_FULL_TEXT
// ISSUE: KT-55055
// FIR_DUMP
fun <T : Number> printGenericNumber(t: T) = println("Number is $t")
fun main() {
<!NEW_INFERENCE_ERROR!>buildList { // inferred into MutableList<String>
add("Boom")
printGenericNumber(this[0])
}<!>
}