[FIR] Correctly detect super type in delegated constructor call
This commit is contained in:
@@ -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
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
open class Base(val callback: () -> String)
|
||||
|
||||
class Outer {
|
||||
|
||||
-1
@@ -1,5 +1,4 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
|
||||
inline class S(val string: String)
|
||||
|
||||
|
||||
-1
@@ -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
@@ -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
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
class MyThrowable : Throwable {
|
||||
val x: String
|
||||
|
||||
|
||||
+1
-1
@@ -13,6 +13,6 @@ class B1(x: List<String>) : A<CharSequence>("", x)
|
||||
class B2(x: List<Int>) : <!INAPPLICABLE_CANDIDATE!>A<CharSequence><!>("", x)
|
||||
|
||||
class C : A<CharSequence> {
|
||||
constructor(x: List<String>) : <!INAPPLICABLE_CANDIDATE!>super<!>("", x)
|
||||
constructor(x: List<String>) : super("", x)
|
||||
constructor(x: List<Int>, y: Int) : <!INAPPLICABLE_CANDIDATE!>super<!>("", x)
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -16,6 +16,6 @@ class B1(x: List<String>) : A<CharSequence>("", x)
|
||||
class B2(x: List<Int>) : <!INAPPLICABLE_CANDIDATE!>A<CharSequence><!>("", x)
|
||||
|
||||
class C : A<CharSequence> {
|
||||
constructor(x: List<String>) : <!INAPPLICABLE_CANDIDATE!>super<!>("", x)
|
||||
constructor(x: List<String>) : super("", x)
|
||||
constructor(x: List<Int>, y: Int) : <!INAPPLICABLE_CANDIDATE!>super<!>("", x)
|
||||
}
|
||||
|
||||
Vendored
+2
-2
@@ -8,7 +8,7 @@ expect open class A {
|
||||
}
|
||||
|
||||
expect class B : A {
|
||||
constructor(i: Int)
|
||||
<!INAPPLICABLE_CANDIDATE!>constructor(i: Int)<!>
|
||||
|
||||
constructor() : <!INAPPLICABLE_CANDIDATE!>super<!>("B")
|
||||
constructor() : super("B")
|
||||
}
|
||||
|
||||
@@ -4,9 +4,9 @@ package toplevelObjectDeclarations
|
||||
open fun foo() : Int = 1
|
||||
}
|
||||
|
||||
class T : Foo {}
|
||||
<!INAPPLICABLE_CANDIDATE!>class T : Foo {}<!>
|
||||
|
||||
object A : Foo {
|
||||
<!INAPPLICABLE_CANDIDATE!>object A<!> : Foo {
|
||||
val x : Int = 2
|
||||
|
||||
fun test() : Int {
|
||||
|
||||
@@ -70,5 +70,5 @@ class B : A("") {
|
||||
}
|
||||
|
||||
class C : A {
|
||||
constructor() : <!INAPPLICABLE_CANDIDATE!>super<!>("")
|
||||
constructor() : super("")
|
||||
}
|
||||
+1
-1
@@ -14,7 +14,7 @@ open class S(
|
||||
|
||||
class A : S {
|
||||
|
||||
constructor() : <!INAPPLICABLE_CANDIDATE!>super<!>(
|
||||
constructor() : super(
|
||||
foo(),
|
||||
Nested(),
|
||||
Inner(),
|
||||
|
||||
+2
-2
@@ -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("")
|
||||
}
|
||||
|
||||
-19
@@ -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
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
open class Outer {
|
||||
inner open class A protected constructor(x: Int) {
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ class A : B {
|
||||
val myProp: Int = 1
|
||||
override val parentProp = 1
|
||||
|
||||
constructor(x: Int, y: Int = global): <!INAPPLICABLE_CANDIDATE!>super<!>(x + y + global) {
|
||||
constructor(x: Int, y: Int = global): super(x + y + global) {
|
||||
foo(x, y, myProp)
|
||||
x + y + myProp + parentProp + super.parentProp
|
||||
}
|
||||
|
||||
+1
-1
@@ -35,5 +35,5 @@ class A : B {
|
||||
// no cycle, just call to super constuctor
|
||||
constructor(x1: Double, x2: Double): this(x1, x2, 1.0)
|
||||
constructor(x1: Double, x2: Double, x3: Double): this(x1, x2, x3, 1.0)
|
||||
constructor(x1: Double, x2: Double, x3: Double, x4: Double): <!INAPPLICABLE_CANDIDATE!>super<!>(1.toByte())
|
||||
constructor(x1: Double, x2: Double, x3: Double, x4: Double): super(1.toByte())
|
||||
}
|
||||
|
||||
Vendored
+6
-6
@@ -2,8 +2,8 @@
|
||||
open class B0(x: Int)
|
||||
|
||||
class A0 : B0 {
|
||||
constructor()
|
||||
constructor(x: Int) : super()
|
||||
<!INAPPLICABLE_CANDIDATE!>constructor()<!>
|
||||
constructor(x: Int) : <!INAPPLICABLE_CANDIDATE!>super<!>()
|
||||
}
|
||||
|
||||
// --------------------------
|
||||
@@ -26,8 +26,8 @@ open class B2 {
|
||||
}
|
||||
|
||||
class A2 : B2 {
|
||||
constructor()
|
||||
constructor(x: Int) : super()
|
||||
<!INAPPLICABLE_CANDIDATE!>constructor()<!>
|
||||
constructor(x: Int) : <!INAPPLICABLE_CANDIDATE!>super<!>()
|
||||
}
|
||||
|
||||
// --------------------------
|
||||
@@ -37,6 +37,6 @@ open class B3 {
|
||||
}
|
||||
|
||||
class A3 : B3 {
|
||||
constructor()
|
||||
constructor(x: Int) : super()
|
||||
<!INAPPLICABLE_CANDIDATE!>constructor()<!>
|
||||
constructor(x: Int) : <!INAPPLICABLE_CANDIDATE!>super<!>()
|
||||
}
|
||||
@@ -6,14 +6,14 @@ open class B<T>(x: T, y: T) {
|
||||
|
||||
class A0 : B<String?> {
|
||||
constructor()
|
||||
constructor(x: String): <!INAPPLICABLE_CANDIDATE!>super<!>(x)
|
||||
constructor(x: String, y: String): <!INAPPLICABLE_CANDIDATE!>super<!>(x, y)
|
||||
constructor(x: String): super(x)
|
||||
constructor(x: String, y: String): super(x, y)
|
||||
}
|
||||
|
||||
class A1<R> : B<R> {
|
||||
constructor()
|
||||
constructor(x: R): <!INAPPLICABLE_CANDIDATE!>super<!>(x)
|
||||
constructor(x: R, y: R): <!INAPPLICABLE_CANDIDATE!>super<!>(x, y)
|
||||
constructor(x: R): super(x)
|
||||
constructor(x: R, y: R): super(x, y)
|
||||
}
|
||||
|
||||
class A2<R> {
|
||||
|
||||
@@ -13,14 +13,14 @@ class A0<T1, T2> {
|
||||
}
|
||||
|
||||
class A1<T1, T2> : B<T1, T2> {
|
||||
constructor(x: T1, y: T2): <!INAPPLICABLE_CANDIDATE!>super<!>(x, y)
|
||||
constructor(x: T1, y: T2): super(x, y)
|
||||
constructor(x: T1, y: Int): <!INAPPLICABLE_CANDIDATE!>super<!>(x, y)
|
||||
constructor(x: T1, y: T1, z: T1): <!INAPPLICABLE_CANDIDATE!>super<!>(x, y)
|
||||
}
|
||||
|
||||
class A2<T1, T2> : B<T1, Int> {
|
||||
constructor(x: T1, y: T2): <!INAPPLICABLE_CANDIDATE!>super<!>(x, y)
|
||||
constructor(x: T1, y: Int): <!INAPPLICABLE_CANDIDATE!>super<!>(x, y)
|
||||
constructor(x: T1, y: Int): super(x, y)
|
||||
constructor(x: T1, y: T1, z: T1): <!INAPPLICABLE_CANDIDATE!>super<!>(x, y)
|
||||
constructor(x: T1, y: T2, z: String): <!INAPPLICABLE_CANDIDATE!>super<!>(y, 1)
|
||||
}
|
||||
|
||||
@@ -6,11 +6,11 @@ open class B<X, Y : X> {
|
||||
}
|
||||
|
||||
class A<T1, T2 : T1> : B<T1, T2> {
|
||||
constructor(x: T1, y: T2): <!INAPPLICABLE_CANDIDATE!>super<!>(x, y)
|
||||
constructor(x: T2, y: T2, z: String): <!INAPPLICABLE_CANDIDATE!>super<!>(x, y)
|
||||
constructor(x: T1, y: T2): super(x, y)
|
||||
constructor(x: T2, y: T2, z: String): super(x, y)
|
||||
|
||||
constructor(x: T2, z: String, z1: String): <!INAPPLICABLE_CANDIDATE!>super<!>(x, "")
|
||||
constructor(x: T2, z: String, z1: String, z2: String): <!INAPPLICABLE_CANDIDATE!>super<!>(x, 1)
|
||||
constructor(x: T1, z: String, z1: String, z2: String, z3: String): <!INAPPLICABLE_CANDIDATE!>super<!>(x, "")
|
||||
constructor(x: T1, z: String, z1: String, z2: String, z3: String, z4: String): <!INAPPLICABLE_CANDIDATE!>super<!>(x, 1)
|
||||
constructor(x: T2, z: String, z1: String): super(x, "")
|
||||
constructor(x: T2, z: String, z1: String, z2: String): super(x, 1)
|
||||
constructor(x: T1, z: String, z1: String, z2: String, z3: String): super(x, "")
|
||||
constructor(x: T1, z: String, z1: String, z2: String, z3: String, z4: String): super(x, 1)
|
||||
}
|
||||
|
||||
+2
-2
@@ -6,7 +6,7 @@ open class Base<T>(p: Any?) {
|
||||
|
||||
class D: Base<Int>("") {
|
||||
inner class B : Base<String> {
|
||||
constructor() : <!INAPPLICABLE_CANDIDATE!>super<!>(<!INAPPLICABLE_CANDIDATE!>foo1<!>(""))
|
||||
constructor(x: Int) : <!INAPPLICABLE_CANDIDATE!>super<!>(foo1(1))
|
||||
constructor() : super(<!INAPPLICABLE_CANDIDATE!>foo1<!>(""))
|
||||
constructor(x: Int) : super(foo1(1))
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -6,8 +6,8 @@ open class Base<T>(p: Any?) {
|
||||
|
||||
class D: Base<Int>(1) {
|
||||
inner class B : Base<Int> {
|
||||
constructor() : <!INAPPLICABLE_CANDIDATE!>super<!>(foo1(1))
|
||||
constructor(x: Int) : <!INAPPLICABLE_CANDIDATE!>super<!>(this@B.<!UNRESOLVED_REFERENCE!>foo1<!>(1))
|
||||
constructor(x: Int, y: Int) : <!INAPPLICABLE_CANDIDATE!>super<!>(this@D.foo1(1))
|
||||
constructor() : super(foo1(1))
|
||||
constructor(x: Int) : super(this@B.<!UNRESOLVED_REFERENCE!>foo1<!>(1))
|
||||
constructor(x: Int, y: Int) : super(this@D.foo1(1))
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -5,8 +5,8 @@ open class Base(p: Any?) {
|
||||
|
||||
fun Base.foo() {
|
||||
class B : Base {
|
||||
constructor() : <!INAPPLICABLE_CANDIDATE!>super<!>(foo1())
|
||||
constructor(x: Int) : <!INAPPLICABLE_CANDIDATE!>super<!>(this@foo.foo1())
|
||||
constructor(x: Int, y: Int) : <!INAPPLICABLE_CANDIDATE!>super<!>(this@B.<!UNRESOLVED_REFERENCE!>foo1<!>())
|
||||
constructor() : super(foo1())
|
||||
constructor(x: Int) : super(this@foo.foo1())
|
||||
constructor(x: Int, y: Int) : super(this@B.<!UNRESOLVED_REFERENCE!>foo1<!>())
|
||||
}
|
||||
}
|
||||
|
||||
+4
-4
@@ -5,9 +5,9 @@ open class Base<T>(p: Any?) {
|
||||
|
||||
fun Base<Int>.foo() {
|
||||
class B : Base<String> {
|
||||
constructor() : <!INAPPLICABLE_CANDIDATE!>super<!>(<!INAPPLICABLE_CANDIDATE!>foo1<!>(""))
|
||||
constructor(x: Int) : <!INAPPLICABLE_CANDIDATE!>super<!>(foo1(1))
|
||||
constructor(x: Int, y: Int) : <!INAPPLICABLE_CANDIDATE!>super<!>(this@foo.foo1(12))
|
||||
constructor(x: Int, y: Int, z: Int) : <!INAPPLICABLE_CANDIDATE!>super<!>(this@B.<!UNRESOLVED_REFERENCE!>foo1<!>(""))
|
||||
constructor() : super(<!INAPPLICABLE_CANDIDATE!>foo1<!>(""))
|
||||
constructor(x: Int) : super(foo1(1))
|
||||
constructor(x: Int, y: Int) : super(this@foo.foo1(12))
|
||||
constructor(x: Int, y: Int, z: Int) : super(this@B.<!UNRESOLVED_REFERENCE!>foo1<!>(""))
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -1,7 +1,7 @@
|
||||
open class C(val x: Int)
|
||||
|
||||
class D : C {
|
||||
constructor() : <!INAPPLICABLE_CANDIDATE!>super<!>(
|
||||
constructor() : super(
|
||||
{
|
||||
val s = ""
|
||||
<!UNRESOLVED_REFERENCE!>s<!>()
|
||||
|
||||
compiler/testData/diagnostics/tests/secondaryConstructors/reportResolutionErrorOnImplicitOnce.fir.kt
Vendored
+1
-1
@@ -2,5 +2,5 @@
|
||||
open class A(p1: String, p2: String, p3: String, p4: String, p5: String)
|
||||
|
||||
class B : A {
|
||||
constructor(s: String)
|
||||
<!INAPPLICABLE_CANDIDATE!>constructor(s: String)<!>
|
||||
}
|
||||
|
||||
+1
-1
@@ -6,5 +6,5 @@ open class B(x: Double) {
|
||||
interface C
|
||||
class A : B, C {
|
||||
constructor(): <!INAPPLICABLE_CANDIDATE!>super<!>(' ')
|
||||
constructor(x: Int)
|
||||
<!INAPPLICABLE_CANDIDATE!>constructor(x: Int)<!>
|
||||
}
|
||||
|
||||
Vendored
-12
@@ -1,12 +0,0 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
fun <T> array(vararg x: T): Array<T> = null!!
|
||||
|
||||
open class B(vararg y: String) {
|
||||
constructor(x: Int): this(x.toString(), *array("1"), "2")
|
||||
}
|
||||
|
||||
class A : B {
|
||||
constructor(x: String, y: String): <!INAPPLICABLE_CANDIDATE!>super<!>(x, *array("3"), y)
|
||||
constructor(x: String): <!INAPPLICABLE_CANDIDATE!>super<!>(x)
|
||||
constructor(): super()
|
||||
}
|
||||
Vendored
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
fun <T> array(vararg x: T): Array<T> = null!!
|
||||
|
||||
|
||||
Vendored
-17
@@ -1,17 +0,0 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
fun <T> array(vararg x: T): Array<T> = null!!
|
||||
|
||||
open class B(x: Int) {
|
||||
constructor(vararg y: String): this(y[0].length)
|
||||
}
|
||||
|
||||
class A : B {
|
||||
constructor(x: String, y: String): <!INAPPLICABLE_CANDIDATE!>super<!>(x, *array("q"), y)
|
||||
constructor(x: String): <!INAPPLICABLE_CANDIDATE!>super<!>(x)
|
||||
constructor(): super()
|
||||
}
|
||||
|
||||
val b1 = B()
|
||||
val b2 = B("1", "2", "3")
|
||||
val b3 = B("1", *array("2", "3"), "4")
|
||||
val b4 = B(1)
|
||||
Vendored
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
fun <T> array(vararg x: T): Array<T> = null!!
|
||||
|
||||
|
||||
+2
-2
@@ -60,13 +60,13 @@ open class Foo10(x: Int = 10, y: Float = 0f)
|
||||
class Foo11: Foo10 {
|
||||
constructor(
|
||||
x: Float
|
||||
): <!INAPPLICABLE_CANDIDATE!>super<!>(1, 1f,)
|
||||
): super(1, 1f,)
|
||||
}
|
||||
|
||||
class Foo12: Foo10 {
|
||||
constructor(
|
||||
x: Float
|
||||
): <!INAPPLICABLE_CANDIDATE!>super<!>(1, 1f,/**/)
|
||||
): super(1, 1f,/**/)
|
||||
}
|
||||
|
||||
fun main() {
|
||||
|
||||
compiler/testData/diagnostics/testsWithStdLib/trailingComma/valueParametersWithEnabledFeature.fir.kt
Vendored
-104
@@ -1,104 +0,0 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER, -UNUSED_ANONYMOUS_PARAMETER, -UNUSED_VARIABLE
|
||||
// !LANGUAGE: +TrailingCommas
|
||||
|
||||
open class Foo1(x: Int = 10, y: Float = 0f,)
|
||||
|
||||
class Foo2(
|
||||
val x: Int = 10,
|
||||
var y: Float,
|
||||
): Foo1(x, y) {
|
||||
constructor(
|
||||
x: Float,
|
||||
y: Int = 10,
|
||||
): this(1, 1f,) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
enum class Foo3(x: Int, )
|
||||
|
||||
fun foo4(x: Int, y: Comparable<Float>,) {}
|
||||
|
||||
fun foo5(x: Int = 10,) {}
|
||||
|
||||
fun foo6(vararg x: Int,) {}
|
||||
|
||||
fun foo61(vararg x: Int,/**/) {}
|
||||
|
||||
fun foo7(y: Float, vararg x: Int,) {}
|
||||
|
||||
val foo8: (Int, Int,) -> Int = fun(
|
||||
x,
|
||||
y,
|
||||
): Int {
|
||||
return x + y
|
||||
}
|
||||
|
||||
val foo9: (Int, Int, Int,) -> Int =
|
||||
fun (x, y: Int, z,): Int {
|
||||
return x + y
|
||||
}
|
||||
|
||||
open class Foo10(x: Int = 10, y: Float = 0f)
|
||||
|
||||
class Foo11: Foo10 {
|
||||
constructor(
|
||||
x: Float
|
||||
): <!INAPPLICABLE_CANDIDATE!>super<!>(1, 1f,)
|
||||
}
|
||||
|
||||
class Foo12: Foo10 {
|
||||
constructor(
|
||||
x: Float
|
||||
): <!INAPPLICABLE_CANDIDATE!>super<!>(1, 1f,/**/)
|
||||
}
|
||||
|
||||
fun main() {
|
||||
val x1 = {
|
||||
x: Comparable<Comparable<Number>>,
|
||||
y: Iterable<Iterable<Number>>,
|
||||
->
|
||||
println("1")
|
||||
}
|
||||
val x11 = {
|
||||
x: Comparable<Comparable<Number>>,
|
||||
y: Iterable<Iterable<Number>>,/**/
|
||||
->
|
||||
println("1")
|
||||
}
|
||||
val x2 = { x: Comparable<Comparable<Number>>,
|
||||
-> println("1")
|
||||
}
|
||||
val x3: ((Int,) -> Int) -> Unit = { x: (Int,) -> Int, -> println("1") }
|
||||
val x4: ((Int,) -> Int) -> Unit = { x, -> println("1") }
|
||||
|
||||
try {
|
||||
println(1)
|
||||
} catch (e: Exception,) {
|
||||
|
||||
}
|
||||
|
||||
try {
|
||||
println(1)
|
||||
} catch (e: Exception,) {
|
||||
|
||||
} catch (e: Exception,) {
|
||||
|
||||
}
|
||||
|
||||
try {
|
||||
println(1)
|
||||
} catch (e: Exception,) {
|
||||
|
||||
} finally {
|
||||
|
||||
}
|
||||
|
||||
try {
|
||||
println(1)
|
||||
} catch (e: Exception,/**/) {
|
||||
|
||||
} finally {
|
||||
|
||||
}
|
||||
}
|
||||
Vendored
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER, -UNUSED_ANONYMOUS_PARAMETER, -UNUSED_VARIABLE
|
||||
// !LANGUAGE: +TrailingCommas
|
||||
|
||||
|
||||
+12
-5
@@ -88,7 +88,14 @@ FILE fqName:<root> fileName:/argumentReorderingInDelegatingConstructorCall.kt
|
||||
VALUE_PARAMETER name:xx index:0 type:kotlin.Int
|
||||
VALUE_PARAMETER name:yy index:1 type:kotlin.Int
|
||||
BLOCK_BODY
|
||||
ERROR_CALL 'Cannot find delegated constructor call' type=kotlin.Any
|
||||
BLOCK type=<root>.Base origin=ARGUMENTS_REORDERING_FOR_CALL
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:kotlin.Int [val]
|
||||
GET_VAR 'yy: kotlin.Int declared in <root>.Test2.<init>' type=kotlin.Int origin=null
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlin.Int [val]
|
||||
GET_VAR 'xx: kotlin.Int declared in <root>.Test2.<init>' type=kotlin.Int origin=null
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> (x: kotlin.Int, y: kotlin.Int) [primary] declared in <root>.Base'
|
||||
x: GET_VAR 'val tmp_3: kotlin.Int [val] declared in <root>.Test2.<init>' type=kotlin.Int origin=null
|
||||
y: GET_VAR 'val tmp_2: kotlin.Int [val] declared in <root>.Test2.<init>' type=kotlin.Int origin=null
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Test2 modality:FINAL visibility:public superTypes:[<root>.Base]'
|
||||
CONSTRUCTOR visibility:public <> (xxx:kotlin.Int, yyy:kotlin.Int, a:kotlin.Any) returnType:<root>.Test2
|
||||
VALUE_PARAMETER name:xxx index:0 type:kotlin.Int
|
||||
@@ -96,13 +103,13 @@ FILE fqName:<root> fileName:/argumentReorderingInDelegatingConstructorCall.kt
|
||||
VALUE_PARAMETER name:a index:2 type:kotlin.Any
|
||||
BLOCK_BODY
|
||||
BLOCK type=<root>.Test2 origin=ARGUMENTS_REORDERING_FOR_CALL
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:kotlin.Int [val]
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_4 type:kotlin.Int [val]
|
||||
GET_VAR 'yyy: kotlin.Int declared in <root>.Test2.<init>' type=kotlin.Int origin=null
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlin.Int [val]
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_5 type:kotlin.Int [val]
|
||||
GET_VAR 'xxx: kotlin.Int declared in <root>.Test2.<init>' type=kotlin.Int origin=null
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> (xx: kotlin.Int, yy: kotlin.Int) declared in <root>.Test2'
|
||||
xx: GET_VAR 'val tmp_3: kotlin.Int [val] declared in <root>.Test2.<init>' type=kotlin.Int origin=null
|
||||
yy: GET_VAR 'val tmp_2: kotlin.Int [val] declared in <root>.Test2.<init>' type=kotlin.Int origin=null
|
||||
xx: GET_VAR 'val tmp_5: kotlin.Int [val] declared in <root>.Test2.<init>' type=kotlin.Int origin=null
|
||||
yy: GET_VAR 'val tmp_4: kotlin.Int [val] declared in <root>.Test2.<init>' type=kotlin.Int origin=null
|
||||
PROPERTY FAKE_OVERRIDE name:x visibility:public modality:FINAL [fake_override,val]
|
||||
FUN FAKE_OVERRIDE name:<get-x> visibility:public modality:FINAL <> ($this:<root>.Base) returnType:kotlin.Int [fake_override]
|
||||
correspondingProperty: PROPERTY FAKE_OVERRIDE name:x visibility:public modality:FINAL [fake_override,val]
|
||||
|
||||
Vendored
+2
-2
@@ -22,12 +22,12 @@ FILE fqName:<root> fileName:/delegatingConstructorCallsInSecondaryConstructors.k
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Test
|
||||
CONSTRUCTOR visibility:public <> () returnType:<root>.Test
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.Base'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Test modality:FINAL visibility:public superTypes:[<root>.Base]'
|
||||
CONSTRUCTOR visibility:public <> (xx:kotlin.Int) returnType:<root>.Test
|
||||
VALUE_PARAMETER name:xx index:0 type:kotlin.Int
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.Base'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Test modality:FINAL visibility:public superTypes:[<root>.Base]'
|
||||
CONSTRUCTOR visibility:public <> (xx:kotlin.Short) returnType:<root>.Test
|
||||
VALUE_PARAMETER name:xx index:0 type:kotlin.Short
|
||||
|
||||
Vendored
+3
-3
@@ -33,7 +33,7 @@ FILE fqName:<root> fileName:/secondaryConstructorWithInitializersFromClassBody.k
|
||||
receiver: GET_VAR '<this>: <root>.TestProperty declared in <root>.TestProperty.<get-x>' type=<root>.TestProperty origin=null
|
||||
CONSTRUCTOR visibility:public <> () returnType:<root>.TestProperty
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.Base'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:TestProperty modality:FINAL visibility:public superTypes:[<root>.Base]'
|
||||
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
|
||||
overridden:
|
||||
@@ -66,12 +66,12 @@ FILE fqName:<root> fileName:/secondaryConstructorWithInitializersFromClassBody.k
|
||||
value: CONST Int type=kotlin.Int value=0
|
||||
CONSTRUCTOR visibility:public <> () returnType:<root>.TestInitBlock
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.Base'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:TestInitBlock modality:FINAL visibility:public superTypes:[<root>.Base]'
|
||||
CONSTRUCTOR visibility:public <> (z:kotlin.Any) returnType:<root>.TestInitBlock
|
||||
VALUE_PARAMETER name:z index:0 type:kotlin.Any
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.Base'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:TestInitBlock modality:FINAL visibility:public superTypes:[<root>.Base]'
|
||||
CONSTRUCTOR visibility:public <> (y:kotlin.Int) returnType:<root>.TestInitBlock
|
||||
VALUE_PARAMETER name:y index:0 type:kotlin.Int
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ FILE fqName:<root> fileName:/expectClassInherited.kt
|
||||
CONSTRUCTOR visibility:public <> (i:kotlin.Int) returnType:<root>.B [primary]
|
||||
VALUE_PARAMETER name:i index:0 type:kotlin.Int
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
DELEGATING_CONSTRUCTOR_CALL 'protected constructor <init> () [primary] declared in <root>.A'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:B modality:OPEN visibility:public [expect] superTypes:[<root>.A]'
|
||||
FUN name:foo visibility:public modality:OPEN <> ($this:<root>.B) returnType:kotlin.Unit
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.B
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ FILE fqName:<root> fileName:/expectedSealedClass.kt
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Add
|
||||
CONSTRUCTOR visibility:public <> () returnType:<root>.Add [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
DELEGATING_CONSTRUCTOR_CALL 'private constructor <init> () [primary] declared in <root>.Ops'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Add modality:FINAL visibility:public [expect] superTypes:[<root>.Ops]'
|
||||
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
|
||||
overridden:
|
||||
|
||||
+1
-1
@@ -75,7 +75,7 @@ FILE fqName:<root> fileName:/kt16904.kt
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Test1
|
||||
CONSTRUCTOR visibility:public <> () returnType:<root>.Test1
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.A'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Test1 modality:FINAL visibility:public superTypes:[<root>.A]'
|
||||
CALL 'public final fun plusAssign (x: kotlin.Int): kotlin.Unit [operator] declared in <root>.B' type=kotlin.Unit origin=null
|
||||
$this: CALL 'public final fun <get-x> (): <root>.B declared in <root>.A' type=<root>.B origin=GET_PROPERTY
|
||||
|
||||
Reference in New Issue
Block a user