K1: add a language feature to negate new errors from DiagnosticReporterByTrackingStrategy

Related to KT-55055, KT-55056, KT-55079, KT-57854
This commit is contained in:
Mikhail Glukhikh
2023-04-26 15:21:13 +02:00
committed by Space Team
parent 4188bca9b8
commit 94c94d0605
9 changed files with 115 additions and 11 deletions
@@ -0,0 +1,9 @@
// FIR_IDENTICAL
// !LANGUAGE: +NoAdditionalErrorsInK1DiagnosticReporter
fun foo() {
buildList {
add("Boom")
println(plus(1)[0])
}
}
@@ -0,0 +1,11 @@
// 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])
}
}