Handle Java base class field read properly in IR converters
For FE 1.0, we just change super qualifier symbol to base class, if it's possible. For FIR, we introduce using of super qualifier symbols for field accesses and repeat FE 1.0 behavior here. #KT-49507 Fixed
This commit is contained in:
@@ -13,7 +13,7 @@ class Owner<out T : JCTree> {
|
||||
get(): String {
|
||||
var tree: JCTree = <this>.<get-tree>()
|
||||
when {
|
||||
tree is JCTypeApply -> return tree /*as JCTypeApply */.#clazz /*!! String */
|
||||
tree is JCTypeApply -> return tree /*as JCTypeApply */super.#clazz /*!! String */
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
fun foo(movedPaths: MutableList<Couple<FilePath>>) {
|
||||
movedPaths.forEach<Couple<FilePath>>(action = local fun <anonymous>(it: Couple<FilePath>) {
|
||||
it.#second.getName() /*~> Unit */
|
||||
itsuper.#second.getName() /*~> Unit */
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user