K2: remove JAVA_SHADOWED_PROTECTED_FIELD_REFERENCE error

This is a partial revert of 949a39b80f. In the end it turned out not
necessary to prohibit this case (and perform a breaking change), because
JVM backend was fixed to generate it correctly in d73d3c46e2.

 #KT-55307 Declined
 #KT-55846 Declined
This commit is contained in:
Alexander Udalov
2023-04-20 10:53:20 +02:00
committed by Space Team
parent 0ccae0d4c6
commit 9ec78e1aa9
9 changed files with 3 additions and 111 deletions
@@ -52,7 +52,7 @@ open class IntermediatePublic : BaseJava() {
class Derived : Intermediate() {
// This should be the first erroneous place (only in K2)
fun foo() = this::<!JAVA_SHADOWED_PROTECTED_FIELD_REFERENCE!>a<!>
fun foo() = this::a
fun bar() = a // Non-reference
@@ -63,7 +63,7 @@ typealias Alias = Intermediate
class DerivedAlias : Alias() {
// This should be the second erroneous place (only in K2)
fun foo() = this::<!JAVA_SHADOWED_PROTECTED_FIELD_REFERENCE!>a<!>
fun foo() = this::a
}
fun local() {
@@ -73,7 +73,7 @@ fun local() {
class LocalDerived : LocalIntermediate() {
// This should be the third and the last erroneous place (only in K2)
fun foo() = this::<!JAVA_SHADOWED_PROTECTED_FIELD_REFERENCE!>a<!>
fun foo() = this::a
}
}