Treat constructors as actual only if the 'actual' modifier is present
Exactly as this is done for functions in FunctionDescriptorResolver.initializeFunctionDescriptorAndExplicitReturnType #KT-21906 Fixed
This commit is contained in:
+7
-2
@@ -11,6 +11,7 @@ expect class Bar2()
|
||||
expect class Bar3()
|
||||
expect class Bar4()
|
||||
expect class Bar5()
|
||||
expect class Bar6()
|
||||
|
||||
// MODULE: m2-jvm(m1-common)
|
||||
|
||||
@@ -41,5 +42,9 @@ actual class Bar4(val s: String) {
|
||||
|
||||
actual class Bar5 {
|
||||
actual constructor()
|
||||
constructor(s: String)
|
||||
}
|
||||
constructor(<!UNUSED_PARAMETER!>s<!>: String)
|
||||
}
|
||||
|
||||
class <!ACTUAL_MISSING!>Bar6<!> {
|
||||
actual constructor()
|
||||
}
|
||||
|
||||
+14
@@ -36,6 +36,13 @@ public final expect class Bar5 {
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final expect class Bar6 {
|
||||
public constructor Bar6()
|
||||
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
|
||||
}
|
||||
|
||||
public final expect class Foo1 {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
@@ -91,6 +98,13 @@ public final actual class Bar5 {
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final class Bar6 {
|
||||
public constructor Bar6()
|
||||
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
|
||||
}
|
||||
|
||||
public final actual class Foo1 {
|
||||
public constructor Foo1(/*0*/ s: kotlin.String)
|
||||
public final val s: kotlin.String
|
||||
|
||||
@@ -22,7 +22,7 @@ fun foo() {
|
||||
// MODULE: m2-jvm
|
||||
// FILE: jvm.kt
|
||||
|
||||
class Outer actual constructor() {
|
||||
class Outer <!ACTUAL_WITHOUT_EXPECT!>actual constructor()<!> {
|
||||
actual class <!ACTUAL_WITHOUT_EXPECT!>Nested<!>
|
||||
|
||||
<!WRONG_MODIFIER_TARGET!>actual<!> init {}
|
||||
|
||||
Reference in New Issue
Block a user