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
This commit is contained in:
committed by
Space Team
parent
cb3d65f669
commit
2f367b013a
Vendored
+1
-1
@@ -1,6 +1,6 @@
|
||||
FILE: ifInBuildMap.kt
|
||||
public final fun main(): R|kotlin/Unit| {
|
||||
R|kotlin/collections/buildMap|<R|kotlin/String|, R|kotlin/String|>(<L> = buildMap@fun R|kotlin/collections/MutableMap<kotlin/String, kotlin/String>|.<anonymous>(): R|kotlin/Unit| <inline=Inline, kind=EXACTLY_ONCE> {
|
||||
R|kotlin/collections/buildMap<CS errors: kotlin/collections/buildMap>#|<R|kotlin/String|, R|kotlin/String|>(<L> = buildMap@fun R|kotlin/collections/MutableMap<kotlin/String, kotlin/String>|.<anonymous>(): R|kotlin/Unit| <inline=Inline, kind=EXACTLY_ONCE> {
|
||||
when () {
|
||||
Boolean(true) -> {
|
||||
R|kotlin/io/println|(String(test))
|
||||
|
||||
+2
-2
@@ -2,11 +2,11 @@
|
||||
// ISSUE: KT-51143
|
||||
|
||||
fun main() {
|
||||
buildMap {
|
||||
<!NEW_INFERENCE_ERROR!>buildMap {
|
||||
if (true) {
|
||||
println("test")
|
||||
} else {
|
||||
put("foo", "bar")
|
||||
}
|
||||
}
|
||||
}<!>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user