FIR: don't report PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED in exp.cl.

#KT-51761 Fixed
This commit is contained in:
Mikhail Glukhikh
2022-03-30 18:21:50 +03:00
parent aaebb7a30e
commit d01e6b61a3
6 changed files with 6 additions and 39 deletions
@@ -6,7 +6,7 @@ expect enum class En(x: Int) {
E2(42),
;
<!PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED!>constructor(s: String)<!>
constructor(s: String)
}
expect enum class En2 {
@@ -8,7 +8,7 @@ expect class Foo(
"no"
}
<!PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED!>constructor(s: String)<!> {
constructor(s: String) {
"no"
}
@@ -1,35 +0,0 @@
// MODULE: m1-common
// FILE: common.kt
expect class Foo(zzz: Int) {
<!PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED!>constructor(aaa: Boolean)<!>
fun f1(xxx: String): String
}
expect fun f2(xxx: Int)
fun testCommon() {
Foo(zzz = 0)
val f = Foo(aaa = true)
f.f1(xxx = "")
f2(xxx = 42)
}
// MODULE: m2-jvm()()(m1-common)
// FILE: jvm.kt
actual class Foo actual constructor(val aaa: Boolean) {
actual constructor(zzz: Int) : this(zzz == 0)
actual fun f1(xxx: String) = xxx
}
actual fun f2(xxx: Int) {}
fun testPlatform() {
Foo(zzz = 0)
val f = Foo(aaa = true)
f.f1(xxx = "")
f2(xxx = 42)
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// MODULE: m1-common
// FILE: common.kt