Reserve secondary constructors with bodies inside inline classes
#KT-26575 Fixed
This commit is contained in:
+2
@@ -1,6 +1,8 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
|
||||
@file:Suppress("SECONDARY_CONSTRUCTOR_WITH_BODY_INSIDE_INLINE_CLASS")
|
||||
|
||||
var global = "wrong"
|
||||
|
||||
inline class Foo(val x: String) {
|
||||
|
||||
Vendored
+6
@@ -36,4 +36,10 @@ interface WithBox {
|
||||
|
||||
inline class IC4(val s: String) : WithBox {
|
||||
override fun <!RESERVED_MEMBER_INSIDE_INLINE_CLASS!>box<!>(): String = ""
|
||||
}
|
||||
|
||||
inline class IC5(val a: String) {
|
||||
constructor(i: Int) : this(i.toString()) <!SECONDARY_CONSTRUCTOR_WITH_BODY_INSIDE_INLINE_CLASS!>{<!>
|
||||
TODO("something")
|
||||
}
|
||||
}
|
||||
Vendored
+9
@@ -46,6 +46,15 @@ public final inline class IC4 : WithBox {
|
||||
public open override /*1*/ /*synthesized*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final inline class IC5 {
|
||||
public constructor IC5(/*0*/ i: kotlin.Int)
|
||||
public constructor IC5(/*0*/ a: kotlin.String)
|
||||
public final val a: kotlin.String
|
||||
public open override /*1*/ /*synthesized*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*synthesized*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*synthesized*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public interface WithBox {
|
||||
public abstract fun box(): kotlin.String
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
|
||||
Reference in New Issue
Block a user