Do not report redeclaration when outer class and default object's members clash
Previously we prohibited classes and properties with the same name (now it's unnecessary) Add test for backends that they support qualified (by default object name) member references inside class body
This commit is contained in:
+10
-4
@@ -1,9 +1,15 @@
|
||||
class C {
|
||||
default <!REDECLARATION!>object<!> {
|
||||
val <!REDECLARATION!>Default<!> = this
|
||||
class B {
|
||||
default object <!REDECLARATION!>A<!> {
|
||||
}
|
||||
|
||||
val <!REDECLARATION!>A<!> = this
|
||||
}
|
||||
|
||||
class C {
|
||||
default <!CONFLICTING_JVM_DECLARATIONS!>object A<!> {
|
||||
<!CONFLICTING_JVM_DECLARATIONS!>val A<!> = this
|
||||
}
|
||||
|
||||
val <!REDECLARATION!>Default<!> = C
|
||||
}
|
||||
|
||||
class D {
|
||||
|
||||
+20
-6
@@ -1,15 +1,29 @@
|
||||
package
|
||||
|
||||
internal final class C {
|
||||
public constructor C()
|
||||
internal final val Default: C.Default
|
||||
internal final class B {
|
||||
public constructor B()
|
||||
internal final val A: B
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
internal default object Default {
|
||||
private constructor Default()
|
||||
internal final val Default: C.Default
|
||||
internal default object A {
|
||||
private constructor A()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
|
||||
internal final class C {
|
||||
public constructor C()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
internal default object A {
|
||||
private constructor A()
|
||||
internal final val A: C.A
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
Reference in New Issue
Block a user