Files
kotlin-fork/compiler/testData/diagnostics/tests/inference/builderInference/withoutAnnotationDisabledFeature.fir.kt
T
Mikhail Glukhikh e8be9d4861 FIR: support don't use builder inference if possible
In this commit we upgrade FIR builder inference logic from
the compiler version to 1.7. FIR-based compiler now works with
"don't use builder inference" flag always ON and supports switching
the flag "use builder inference only if needed". To do it,
ContraintSystemCompleter (FIR) and KotlinConstraintSystemCompleter (FE 1.0)
are made similar with extracting some common parts into
ConstraintSystemCompletionContext.

Test status: one BB test fails after this commit (KT-49285).
Also we have a crush in DFA logic in FIR bootstrap test and somehow
questionable behavior in FIR diagnostic test. However,
two BB tests were fixed, the 3rd case from KT-49925 were also fixed.

#KT-49925 Fixed
2022-01-20 23:46:36 +03:00

13 lines
265 B
Kotlin
Vendored

// WITH_STDLIB
// IGNORE_BACKEND: WASM
// !LANGUAGE: -UseBuilderInferenceWithoutAnnotation
fun <K, V> buildMap(builderAction: MutableMap<K, V>.() -> Unit): Map<K, V> = mapOf()
fun box(): String {
val x = buildMap {
put("", "")
}
return "OK"
}