[K/JS] Fix private constructor delegating inside single class with ES6 mode ^KT-59335 Fixed

This commit is contained in:
Artem Kobzar
2023-06-20 11:07:08 +00:00
committed by Space Team
parent 79dbacb621
commit 66bdb9ce79
11 changed files with 51 additions and 8 deletions
@@ -0,0 +1,16 @@
// EXPECTED_REACHABLE_NODES: 1344
open class MyClass1 private constructor(val value: String) {
constructor(i: Int): this(i.toString())
}
class MyClass2 : MyClass1 {
constructor(i: Int): super(i)
}
fun test(x: Any) = x is MyClass2
fun box(): String {
val b = test(MyClass2(0))
return if (b) "OK" else "NOT OK"
}