Files
kotlin-fork/compiler/testData/diagnostics/testsWithStdLib/builderInference/upperBoundViolation_noReporting.kt
T
Mikhail Glukhikh 94c94d0605 K1: add a language feature to negate new errors from DiagnosticReporterByTrackingStrategy
Related to KT-55055, KT-55056, KT-55079, KT-57854
2023-05-01 11:47:01 +00:00

12 lines
291 B
Kotlin
Vendored

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