Files
kotlin-fork/compiler/testData/diagnostics/testsWithStdLib/builderInference/upperBoundViolation_noReporting.kt
T
2024-01-10 14:56:30 +00:00

11 lines
274 B
Kotlin
Vendored

// !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])
}
}