FIR. Refactor smart-cast representation in FIR tree
Make smart-casts non-transparent expression without delegation to underlying FirQualifiedAccessExpression, as children delegation in fir tree has unclear semantics Remove two different kinds of tree nodes for smart-casts
This commit is contained in:
committed by
teamcity
parent
bc9db58b3c
commit
513af2dfbc
@@ -0,0 +1,21 @@
|
||||
class Box<out T : Foo> {
|
||||
constructor(foo: T) /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val foo: T
|
||||
field = foo
|
||||
get
|
||||
|
||||
val str: String
|
||||
get(): String {
|
||||
var foo: Foo = <this>.<get-foo>()
|
||||
when {
|
||||
foo is Buz -> return foo /*as Buz */(super<Buz>).#str /*!! String */
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user