FIR: Rework FirRegularTowerDataContexts
- Get rid of SPECIAL mode (just left REGULAR and class-related instead) - Clear naming - Restore contexts after lambda/callable reference are processed The test has been failing before this change because after callable reference is resolved, its tower data context has been left erroneously in the SPECIAL-related entry
This commit is contained in:
Vendored
+21
@@ -0,0 +1,21 @@
|
||||
// SKIP_TXT
|
||||
|
||||
fun <T> T.myApply(block: T.() -> Unit): T = this
|
||||
|
||||
fun bar(): Int = 1
|
||||
|
||||
interface A : C
|
||||
interface B : C
|
||||
interface C {
|
||||
fun baz()
|
||||
}
|
||||
|
||||
fun Any.foo() = myApply {
|
||||
when (this) {
|
||||
is A -> ::bar
|
||||
is B -> ::bar
|
||||
else -> throw RuntimeException()
|
||||
}
|
||||
|
||||
baz() // Smart cast should work
|
||||
}
|
||||
Reference in New Issue
Block a user