Allow no super class initialization within header
if there is no primary constructor
This commit is contained in:
+1
-1
@@ -1,7 +1,7 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
open class B(open val parentProp: Int)
|
||||
val global: Int = 1
|
||||
class A : <!SUPERTYPE_NOT_INITIALIZED!>B<!> {
|
||||
class A : B {
|
||||
val myProp: Int = 1
|
||||
override val parentProp = 1
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
open class B(open val parentProperty: String)
|
||||
class A : <!SUPERTYPE_NOT_INITIALIZED!>B<!> {
|
||||
class A : B {
|
||||
val myProp: String = ""
|
||||
override val parentProperty: String = ""
|
||||
constructor(arg: String = <!UNRESOLVED_REFERENCE!>myProp<!>): super(<!UNRESOLVED_REFERENCE!>myProp<!>) {}
|
||||
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
open class B
|
||||
trait C
|
||||
trait D
|
||||
class A : C, B, D {
|
||||
constructor() {}
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
package
|
||||
|
||||
internal final class A : C, B, D {
|
||||
public constructor A()
|
||||
public open override /*3*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*3*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*3*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
internal open class B {
|
||||
public constructor 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 trait 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 trait D {
|
||||
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
|
||||
}
|
||||
+1
-1
@@ -4,7 +4,7 @@ open class B(x: Double) {
|
||||
constructor(x: String): this(1.0) {}
|
||||
}
|
||||
trait C
|
||||
class A : <!SUPERTYPE_NOT_INITIALIZED!>B<!>, C {
|
||||
class A : B, C {
|
||||
constructor(): <!NONE_APPLICABLE!>super<!>(' ') { }
|
||||
constructor(x: Int) <!NONE_APPLICABLE!><!>{ }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user