[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
@@ -16,7 +16,7 @@ class B2 : A() {}
class B3 : A("") {}
class B4 : A {
constructor() : <!INAPPLICABLE_CANDIDATE!>super<!>(1)
constructor() : super(1)
constructor(x: Int) : super()
constructor(x: Int, y: Int) : <!INAPPLICABLE_CANDIDATE!>super<!>("")
constructor(x: Int, y: Int) : super("")
}
@@ -1,19 +0,0 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
open class Outer {
inner open class A protected constructor(x: Int) {
protected constructor() : this(1)
protected constructor(x: String) : this(2)
}
inner class B1 : A(1) {}
inner class B2 : A() {}
inner class B3 : A("") {}
inner class B4 : A {
constructor() : <!INAPPLICABLE_CANDIDATE!>super<!>(1)
constructor(x: Int) : super()
constructor(x: Int, y: Int) : <!INAPPLICABLE_CANDIDATE!>super<!>("")
}
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// !DIAGNOSTICS: -UNUSED_PARAMETER
open class Outer {
inner open class A protected constructor(x: Int) {