[Raw FIR] Build if - else if - else as two nested whens
This is necessary for inference to work like in K1 because we only add equality constraints from expected types on top-level `when`, not on nested ones. #KT-65882
This commit is contained in:
committed by
Space Team
parent
888c1defa0
commit
b4413776ab
Vendored
+15
-10
@@ -73,17 +73,22 @@ FILE: implicitReceivers.kt
|
||||
this@R|/test_4|.<Unresolved name: bar>#()
|
||||
<Unresolved name: bar>#()
|
||||
}
|
||||
(this@R|/test_4| !is R|B|) -> {
|
||||
this@R|/test_4|.<Unresolved name: bar>#()
|
||||
<Unresolved name: bar>#()
|
||||
this@R|/test_4|.R|/A.foo|()
|
||||
this@R|/test_4|.R|/A.foo|()
|
||||
}
|
||||
else -> {
|
||||
this@R|/test_4|.R|/A.foo|()
|
||||
this@R|/test_4|.R|/A.foo|()
|
||||
this@R|/test_4|.R|/B.bar|()
|
||||
this@R|/test_4|.R|/B.bar|()
|
||||
when () {
|
||||
(this@R|/test_4| !is R|B|) -> {
|
||||
this@R|/test_4|.<Unresolved name: bar>#()
|
||||
<Unresolved name: bar>#()
|
||||
this@R|/test_4|.R|/A.foo|()
|
||||
this@R|/test_4|.R|/A.foo|()
|
||||
}
|
||||
else -> {
|
||||
this@R|/test_4|.R|/A.foo|()
|
||||
this@R|/test_4|.R|/A.foo|()
|
||||
this@R|/test_4|.R|/B.bar|()
|
||||
this@R|/test_4|.R|/B.bar|()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user