PSI/FIR->IR translators: return to 1.7.10 behavior for field references
In 1.7.20 we used the nearest Java-based receiver for such field references in backend. Now we are using use-site receiver again, it can lead to accidental usage of derived class property backing field. This is effectively a revert of KT-49507 fix, see commits: -fa914f20-b0a6508d#KT-54393 Fixed #KT-49507 Planned #KT-52338 Planned
This commit is contained in:
committed by
Space Team
parent
14213ddad2
commit
c0789b5207
@@ -13,7 +13,7 @@ class Box<out T : Foo> {
|
||||
get(): String {
|
||||
var foo: Foo = <this>.<get-foo>()
|
||||
when {
|
||||
foo is Buz -> return foo /*as Buz */(super<Buz>).#str /*!! String */
|
||||
foo is Buz -> return foo /*as Buz */.#str /*!! 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(super<Couple>).#second.getName() /*~> Unit */
|
||||
it.#second.getName() /*~> Unit */
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user