[FIR] Correctly detect super type in delegated constructor call

This commit is contained in:
Dmitriy Novozhilov
2020-04-16 17:46:18 +03:00
parent adfd478361
commit 7f02d57d88
56 changed files with 199 additions and 230 deletions
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
open class A(val x: String) {
constructor(`in`: String, y: String) : this(`in` + y)
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class B : A()
sealed class A() {
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
open class Base(val callback: () -> String)
class Outer {
@@ -1,5 +1,4 @@
// !LANGUAGE: +InlineClasses
// IGNORE_BACKEND_FIR: JVM_IR
inline class S(val string: String)
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
open class A(val x: String = "abc", val y: String = "efg") {
constructor(x: String, y: String, z: Int): this(x, y + "#" + z.toString())
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
var log = ""
open class Base(val s: String)
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
internal open class B<T>(val x: T, val y: T) {
constructor(x: T): this(x, x)
override fun toString() = "$x#$y"
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
open class C(val grandParentProp: String)
fun box(): String {
var sideEffects: String = ""
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
var sideEffects: String = ""
internal abstract class B {
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class CustomException : Throwable {
constructor(message: String?, cause: Throwable?) : super(message, cause)
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class MyThrowable : Throwable {
val x: String