diff --git a/compiler/fir/analysis-tests/testData/resolve/fromBuilder/complexTypes.txt b/compiler/fir/analysis-tests/testData/resolve/fromBuilder/complexTypes.txt index 971702c1ca1..51358c85764 100644 --- a/compiler/fir/analysis-tests/testData/resolve/fromBuilder/complexTypes.txt +++ b/compiler/fir/analysis-tests/testData/resolve/fromBuilder/complexTypes.txt @@ -4,8 +4,8 @@ FILE: complexTypes.kt super() } - public final inner class D : R|kotlin/Any| { - public constructor(): R|a/b/C.D| { + public final inner class D : R|kotlin/Any| { + public constructor(): R|a/b/C.D| { super() } @@ -13,7 +13,7 @@ FILE: complexTypes.kt } public abstract interface Test : R|kotlin/Any| { - public abstract val x: R|a/b/C.D, *>| - public get(): R|a/b/C.D, *>| + public abstract val x: R|a/b/C.D, *, out kotlin/CharSequence, *>| + public get(): R|a/b/C.D, *, out kotlin/CharSequence, *>| } diff --git a/compiler/fir/analysis-tests/testData/resolve/nested/innerTypes.txt b/compiler/fir/analysis-tests/testData/resolve/nested/innerTypes.txt index 829076c5c13..a0b03646d19 100644 --- a/compiler/fir/analysis-tests/testData/resolve/nested/innerTypes.txt +++ b/compiler/fir/analysis-tests/testData/resolve/nested/innerTypes.txt @@ -4,8 +4,8 @@ FILE: innerTypes.kt super() } - public final inner class Inner : R|kotlin/Any| { - public constructor(): R|Outer.Inner| { + public final inner class Inner : R|kotlin/Any| { + public constructor(): R|Outer.Inner| { super() } @@ -17,21 +17,21 @@ FILE: innerTypes.kt super() } - public final fun substitute(): R|Outer.Inner| { + public final fun substitute(): R|Outer.Inner| { ^substitute R|/Outer.Outer|().R|/Outer.Inner.Inner|() } } - public final fun accept(p: R|Outer.Inner|): R|kotlin/Unit| { + public final fun accept(p: R|Outer.Inner|): R|kotlin/Unit| { } - public final val rr: R|Outer.Inner| = R|/Outer.Outer|().R|/Outer.Inner.Inner|() - public get(): R|Outer.Inner| - public final val rrq: R|Outer.Inner| = R|/Boxed.Boxed|().R|FakeOverride|>|() - public get(): R|Outer.Inner| + public final val rr: R|Outer.Inner| = R|/Outer.Outer|().R|/Outer.Inner.Inner|() + public get(): R|Outer.Inner| + public final val rrq: R|Outer.Inner| = R|/Boxed.Boxed|().R|FakeOverride|>|() + public get(): R|Outer.Inner| public final fun check(): R|kotlin/Unit| { #(R|/Outer.Outer|().R|/Outer.Inner.Inner|()) #(R|/Outer.Outer|().R|/Outer.Inner.Inner|()) R|/accept|(R|/Outer.Outer|().R|/Outer.Inner.Inner|()) #(R|/Boxed.Boxed|().R|FakeOverride|>|()) - R|/accept|(R|/Boxed.Boxed|().R|FakeOverride|>|()) + R|/accept|(R|/Boxed.Boxed|().R|FakeOverride|>|()) } diff --git a/compiler/fir/analysis-tests/testData/resolve/typeParameterVsNested.txt b/compiler/fir/analysis-tests/testData/resolve/typeParameterVsNested.txt index 2fc87ae4405..0804e6ce389 100644 --- a/compiler/fir/analysis-tests/testData/resolve/typeParameterVsNested.txt +++ b/compiler/fir/analysis-tests/testData/resolve/typeParameterVsNested.txt @@ -6,8 +6,8 @@ FILE: typeParameterVsNested.kt super() } - public final inner class T : R|kotlin/Any| { - public constructor(): R|test/My.T| { + public final inner class T : R|kotlin/Any| { + public constructor(): R|test/My.T| { super() } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/KJKComplexHierarchyWithNested.kt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/KJKComplexHierarchyWithNested.kt index ef7079b02c5..e8c12d5cbf3 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/KJKComplexHierarchyWithNested.kt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/KJKComplexHierarchyWithNested.kt @@ -5,9 +5,9 @@ fun main(k: KSub, vString: SuperClass.NestedInSuperClass, vInt: SuperCla k.getImpl().nestedI(vString) // TODO: Support parametrisized inner classes - k.getImpl().nestedI(vInt) - k.getNestedSubClass().nested("") - k.getNestedSubClass().nested(1) + k.getImpl().nestedI(vInt) + k.getNestedSubClass().nested("") + k.getNestedSubClass().nested(1) } // FILE: J1.java diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/KJKComplexHierarchyWithNested.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/KJKComplexHierarchyWithNested.txt index 1ffeda0ecba..42790f78ada 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/KJKComplexHierarchyWithNested.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/KJKComplexHierarchyWithNested.txt @@ -7,9 +7,9 @@ FILE: K1.kt } public final fun main(k: R|KSub|, vString: R|SuperClass.NestedInSuperClass|, vInt: R|SuperClass.NestedInSuperClass|): R|kotlin/Unit| { R|/k|.R|/J1.getImpl|().R|FakeOverride|(R|/vString|) - R|/k|.R|/J1.getImpl|().R|FakeOverride|(R|/vInt|) - R|/k|.R|/J1.getNestedSubClass|().#(String()) - R|/k|.R|/J1.getNestedSubClass|().R|/SuperClass.NestedInSuperClass.nested|(Int(1)) + R|/k|.R|/J1.getImpl|().#(R|/vInt|) + R|/k|.R|/J1.getNestedSubClass|().R|FakeOverride|(String()) + R|/k|.R|/J1.getNestedSubClass|().#(Int(1)) } FILE: K2.kt public open class KFirst : R|SuperClass|, R|SuperI| { @@ -24,8 +24,8 @@ FILE: K3.kt super() } - public open inner class NestedInSuperClass : R|kotlin/Any| { - public constructor(): R|SuperClass.NestedInSuperClass| { + public open inner class NestedInSuperClass : R|kotlin/Any| { + public constructor(): R|SuperClass.NestedInSuperClass| { super() } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/MapCompute.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/MapCompute.txt index 9d1c2a522c9..7599eea8c38 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/MapCompute.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/MapCompute.txt @@ -1,6 +1,6 @@ FILE: MapCompute.kt public final fun R|kotlin/collections/MutableMap>|.initAndAdd(key: R|kotlin/String|, value: R|D|): R|kotlin/Unit| { - this@R|/initAndAdd|.R|FakeOverride?|>|(R|/key|, = compute@fun (_: R|ft!|, maybeValues: R|ft, kotlin/collections/MutableSet?>!|): R|ft, kotlin/collections/MutableSet?>!| { + this@R|/initAndAdd|.R|FakeOverride?|>|(R|/key|, = compute@fun (_: R|ft!|, maybeValues: R|ft, kotlin/collections/MutableSet?>!|): R|ft, kotlin/collections/MutableSet?>!| { lval setOfValues: R|kotlin/collections/MutableSet| = when (lval : R|ft, kotlin/collections/MutableSet?>!| = R|/maybeValues|) { ==($subj$, Null(null)) -> { R|kotlin/collections/mutableSetOf|() diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/MyIterable.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/MyIterable.txt index ef15b928c1f..3cc75fc0a34 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/MyIterable.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/MyIterable.txt @@ -8,5 +8,5 @@ FILE: test.kt } public final fun test(some: R|kotlin/collections/Iterable|): R|kotlin/Unit| { lval it: R|kotlin/collections/Iterator| = R|/some|.R|FakeOverride|>|() - lval split: R|java/util/Spliterator!>| = R|/some|.R|FakeOverride!>|>|() + lval split: R|java/util/Spliterator!>| = R|/some|.R|FakeOverride!>|>|() } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/MyMap.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/MyMap.txt index 9013ae3931f..3577ca88c65 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/MyMap.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/MyMap.txt @@ -27,8 +27,8 @@ FILE: test.kt } ) lval otherResult: R|kotlin/String| = R|/map|.R|FakeOverride|(String(key), String(value)) - lval anotherResult: R|kotlin/String?| = R|/map|.R|FakeOverride|(String(key), String(value)) - R|/map|.R|FakeOverride|( = forEach@fun (key: R|ft!|, value: R|ft!|): R|kotlin/Unit| { + lval anotherResult: R|kotlin/String?| = R|/map|.R|FakeOverride|(String(key), String(value)) + R|/map|.R|FakeOverride|( = forEach@fun (key: R|ft!|, value: R|ft!|): R|kotlin/Unit| { R|kotlin/io/println|((R|/key|.R|kotlin/Any.toString|(), String(: ), R|/value|.R|kotlin/Any.toString|())) R|/key|.R|kotlin/String.length| ^ R|/value|.R|kotlin/String.length| diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/SyntheticWithForEach.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/SyntheticWithForEach.txt index b2ad98d9aac..15b731930ca 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/SyntheticWithForEach.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/SyntheticWithForEach.txt @@ -1,6 +1,6 @@ FILE: test.kt public final fun R|Call|.testForEach(): R|kotlin/Unit| { - this@R|/testForEach|.R|/Call.arguments|.R|FakeOverride|( = forEach@fun (key: R|ft!|, value: R|ft!|): R|kotlin/Unit| { + this@R|/testForEach|.R|/Call.arguments|.R|FakeOverride|( = forEach@fun (key: R|ft!|, value: R|ft!|): R|kotlin/Unit| { R|/key|.R|kotlin/String.length| ^ R|/value|.R|kotlin/String.length| } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/mapMerge.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/mapMerge.txt index eb5a5df86ad..951b61fe151 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/mapMerge.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/mapMerge.txt @@ -1,6 +1,6 @@ FILE: mapMerge.kt public final fun foo(x: R|kotlin/collections/MutableMap>|): R|kotlin/Unit| { - R|/x|.R|FakeOverride?|>|(String(), R|kotlin/collections/listOf|(String()), = merge@fun (a: R|ft, kotlin/collections/List?>!|, b: R|ft, kotlin/collections/List?>!|): R|ft, kotlin/collections/List?>!| { + R|/x|.R|FakeOverride?|>|(String(), R|kotlin/collections/listOf|(String()), = merge@fun (a: R|ft, kotlin/collections/List?>!|, b: R|ft, kotlin/collections/List?>!|): R|ft, kotlin/collections/List?>!| { ^ R|/a|.R|kotlin/collections/plus|(R|/b|) } ) diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/removeIf.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/removeIf.txt index 0403f22e9aa..106649ff9d6 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/removeIf.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/removeIf.txt @@ -1,6 +1,6 @@ FILE: removeIf.kt public final fun test(collection: R|kotlin/collections/MutableCollection|): R|kotlin/Unit| { - R|/collection|.R|FakeOverride|( = removeIf@fun (it: R|ft!|): R|kotlin/Boolean| { + R|/collection|.R|FakeOverride|( = removeIf@fun (it: R|ft!|): R|kotlin/Boolean| { ^ R|/it| } ) diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/typeAliasWithForEach.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/typeAliasWithForEach.txt index d5c484c787e..cd860384fca 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/typeAliasWithForEach.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/typeAliasWithForEach.txt @@ -10,7 +10,7 @@ FILE: typeAliasWithForEach.kt public final typealias Arguments = R|kotlin/collections/Map| public final fun R|Arguments|.deepCopy(): R|Arguments| { lval result: R|java/util/HashMap!, ft!>| = R|java/util/HashMap.HashMap|!|, R|ft!|>() - this@R|/deepCopy|.R|FakeOverride|( = forEach@fun (key: R|ft!|, value: R|ft!|): R|kotlin/Unit| { + this@R|/deepCopy|.R|FakeOverride|( = forEach@fun (key: R|ft!|, value: R|ft!|): R|kotlin/Unit| { R|/result|.R|kotlin/collections/set|!|, R|ft!|>(R|/key|, R|/ArgsInfoImpl.ArgsInfoImpl|(R|/value|)) } ) diff --git a/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/complexTypes.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/complexTypes.txt index 9d37a2c5eb0..421e8eb7b9c 100644 --- a/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/complexTypes.txt +++ b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/complexTypes.txt @@ -4,8 +4,8 @@ FILE: complexTypes.kt super() } - public? final? inner class D : R|kotlin/Any| { - public? constructor(): R|a/b/C.D| { + public? final? inner class D : R|kotlin/Any| { + public? constructor(): R|a/b/C.D| { super() } diff --git a/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/typeParameterVsNested.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/typeParameterVsNested.txt index a36b1ab3daa..a44528deb24 100644 --- a/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/typeParameterVsNested.txt +++ b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/typeParameterVsNested.txt @@ -6,8 +6,8 @@ FILE: typeParameterVsNested.kt super() } - public? final? inner class T : R|kotlin/Any| { - public? constructor(): R|test/My.T| { + public? final? inner class T : R|kotlin/Any| { + public? constructor(): R|test/My.T| { super() } diff --git a/compiler/testData/codegen/box/extensionFunctions/thisMethodInObjectLiteral.kt b/compiler/testData/codegen/box/extensionFunctions/thisMethodInObjectLiteral.kt index 905408c14e2..cf541e2edb4 100644 --- a/compiler/testData/codegen/box/extensionFunctions/thisMethodInObjectLiteral.kt +++ b/compiler/testData/codegen/box/extensionFunctions/thisMethodInObjectLiteral.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR class Test { private fun T.self() = object{ fun calc() : T { diff --git a/compiler/testData/codegen/box/innerNested/innerGenericClassFromJava.kt b/compiler/testData/codegen/box/innerNested/innerGenericClassFromJava.kt index fb924a207b4..3490ee65894 100644 --- a/compiler/testData/codegen/box/innerNested/innerGenericClassFromJava.kt +++ b/compiler/testData/codegen/box/innerNested/innerGenericClassFromJava.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // FILE: JavaClass.java diff --git a/compiler/testData/codegen/box/mangling/parentheses.kt b/compiler/testData/codegen/box/mangling/parentheses.kt index 2c4226481c5..ee632bd30af 100644 --- a/compiler/testData/codegen/box/mangling/parentheses.kt +++ b/compiler/testData/codegen/box/mangling/parentheses.kt @@ -1,5 +1,4 @@ // !SANITIZE_PARENTHESES -// IGNORE_BACKEND_FIR: JVM_IR // IGNORE_BACKEND: JS, JS_IR // Sanitization is needed here because DxChecker reports ParseException on parentheses in names. diff --git a/compiler/testData/diagnostics/tests/ObjectWithConstructor.fir.kt b/compiler/testData/diagnostics/tests/ObjectWithConstructor.fir.kt index 8eb172ee81e..6d5db3d3892 100644 --- a/compiler/testData/diagnostics/tests/ObjectWithConstructor.fir.kt +++ b/compiler/testData/diagnostics/tests/ObjectWithConstructor.fir.kt @@ -11,7 +11,7 @@ object A2 public constructor(private val prop: Int) } val x = object (val prop: Int) { - constructor() : this(1) { + constructor() : this(1) { val x = 1 x * x } diff --git a/compiler/testData/diagnostics/tests/extensions/GenericIterator2.fir.kt b/compiler/testData/diagnostics/tests/extensions/GenericIterator2.fir.kt deleted file mode 100644 index 32790a9b6f7..00000000000 --- a/compiler/testData/diagnostics/tests/extensions/GenericIterator2.fir.kt +++ /dev/null @@ -1,15 +0,0 @@ -// !CHECK_TYPE - -import java.util.Enumeration - -operator fun java.util.Enumeration.iterator() = object : Iterator { - public override fun hasNext(): Boolean = hasMoreElements() - - public override fun next() = nextElement() -} - -fun a(e : java.util.Enumeration) { - for (i in e) { - checkSubtype(i) - } -} diff --git a/compiler/testData/diagnostics/tests/extensions/GenericIterator2.kt b/compiler/testData/diagnostics/tests/extensions/GenericIterator2.kt index 8f77ae0b73b..8b29cce2b0d 100644 --- a/compiler/testData/diagnostics/tests/extensions/GenericIterator2.kt +++ b/compiler/testData/diagnostics/tests/extensions/GenericIterator2.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // !CHECK_TYPE import java.util.Enumeration diff --git a/compiler/testData/diagnostics/tests/generics/capturedParameters/objectLiteral.fir.kt b/compiler/testData/diagnostics/tests/generics/capturedParameters/objectLiteral.fir.kt index 6443c348009..75dabffae95 100644 --- a/compiler/testData/diagnostics/tests/generics/capturedParameters/objectLiteral.fir.kt +++ b/compiler/testData/diagnostics/tests/generics/capturedParameters/objectLiteral.fir.kt @@ -17,7 +17,7 @@ class Q { x = foo() y = foo() - x.prop.checkType { _() } - y.prop.checkType { _() } + x.prop.checkType { _() } + y.prop.checkType { _() } } } diff --git a/compiler/testData/diagnostics/tests/generics/innerClasses/innerTP.fir.kt b/compiler/testData/diagnostics/tests/generics/innerClasses/innerTP.fir.kt index fc90a12c068..0246b13ea9f 100644 --- a/compiler/testData/diagnostics/tests/generics/innerClasses/innerTP.fir.kt +++ b/compiler/testData/diagnostics/tests/generics/innerClasses/innerTP.fir.kt @@ -27,12 +27,12 @@ fun main() { val outer = Outer() checkSubtype.Inner>(outer.bar()) - checkSubtype.Inner>(outer.Inner()) + checkSubtype.Inner>(outer.Inner()) checkSubtype.Inner<*>>(outer.bar()) checkSubtype.Inner<*>>(outer.Inner()) checkSubtype.Inner>(outer.bar()) - checkSubtype.Inner>(outer.Inner()) + checkSubtype.Inner>(outer.Inner()) outer.set(outer.bar()) outer.set(outer.Inner()) diff --git a/compiler/testData/diagnostics/tests/generics/innerClasses/innerUncheckedCast.fir.kt b/compiler/testData/diagnostics/tests/generics/innerClasses/innerUncheckedCast.fir.kt index f954a3c35fe..bd5a5ec222e 100644 --- a/compiler/testData/diagnostics/tests/generics/innerClasses/innerUncheckedCast.fir.kt +++ b/compiler/testData/diagnostics/tests/generics/innerClasses/innerUncheckedCast.fir.kt @@ -15,12 +15,12 @@ class Outer { if (y is Inner) return if (z is Inner) { - z.prop.checkType { _() } + z.prop.checkType { _() } return } if (y is Outer<*>.Inner<*>) { - y.prop.checkType { _() } + y.prop.checkType { _() } } } diff --git a/compiler/testData/diagnostics/tests/generics/innerClasses/iterator.fir.kt b/compiler/testData/diagnostics/tests/generics/innerClasses/iterator.fir.kt index f1a49b86889..3cc3ddfffa3 100644 --- a/compiler/testData/diagnostics/tests/generics/innerClasses/iterator.fir.kt +++ b/compiler/testData/diagnostics/tests/generics/innerClasses/iterator.fir.kt @@ -33,5 +33,5 @@ fun foo() { val csIt: Iterator = A().iterator() - commonSupertype(A().iterator(), A().iterator()).checkType { _.MyIt>() } + commonSupertype(A().iterator(), A().iterator()).checkType { _.MyIt>() } } diff --git a/compiler/testData/diagnostics/tests/generics/innerClasses/j+k.fir.kt b/compiler/testData/diagnostics/tests/generics/innerClasses/j+k.fir.kt index 464f3290453..cbfc156e188 100644 --- a/compiler/testData/diagnostics/tests/generics/innerClasses/j+k.fir.kt +++ b/compiler/testData/diagnostics/tests/generics/innerClasses/j+k.fir.kt @@ -23,6 +23,6 @@ fun main() { val strInt: Outer.Inner = outerStr.Inner() strInt.foo().checkType { _() } - strInt.bar().checkType { _() } + strInt.bar().checkType { _() } strInt.outer().checkType { _>() } } diff --git a/compiler/testData/diagnostics/tests/generics/innerClasses/kt6325.fir.kt b/compiler/testData/diagnostics/tests/generics/innerClasses/kt6325.fir.kt deleted file mode 100644 index 7a617258247..00000000000 --- a/compiler/testData/diagnostics/tests/generics/innerClasses/kt6325.fir.kt +++ /dev/null @@ -1,21 +0,0 @@ -// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE - -class Outer { - inner class Inner { - fun newInner(): Inner = Inner() - //type mismatch - fun newOuterInner(): Outer.Inner = Outer().Inner() - //^ U here is not analyzed - fun foo(t: T, r: R) {} - } -} - -fun test0() { - val inner: Outer.Inner = Outer().Inner() - Outer().Inner().foo(1, "") // type mismatch on second argument -} - - -fun test1() { - Outer().Inner().newOuterInner().foo(1.0, true) // type mismatch on 1.0 -} diff --git a/compiler/testData/diagnostics/tests/generics/innerClasses/kt6325.kt b/compiler/testData/diagnostics/tests/generics/innerClasses/kt6325.kt index d1ca3a88d34..55046b08983 100644 --- a/compiler/testData/diagnostics/tests/generics/innerClasses/kt6325.kt +++ b/compiler/testData/diagnostics/tests/generics/innerClasses/kt6325.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE class Outer { diff --git a/compiler/testData/diagnostics/tests/generics/innerClasses/parameterShadowing.fir.kt b/compiler/testData/diagnostics/tests/generics/innerClasses/parameterShadowing.fir.kt deleted file mode 100644 index 21286722014..00000000000 --- a/compiler/testData/diagnostics/tests/generics/innerClasses/parameterShadowing.fir.kt +++ /dev/null @@ -1,18 +0,0 @@ -// !CHECK_TYPE -// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER - -class Outer { - inner class Inner { - fun foo(): E = null!! - fun outerE() = baz() - } - - fun baz(): E = null!! -} - -fun main() { - val inner = Outer().Inner() - - inner.foo().checkType { _() } - inner.outerE().checkType { _() } -} diff --git a/compiler/testData/diagnostics/tests/generics/innerClasses/parameterShadowing.kt b/compiler/testData/diagnostics/tests/generics/innerClasses/parameterShadowing.kt index a9ed6267adc..64850ec2dbd 100644 --- a/compiler/testData/diagnostics/tests/generics/innerClasses/parameterShadowing.kt +++ b/compiler/testData/diagnostics/tests/generics/innerClasses/parameterShadowing.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // !CHECK_TYPE // !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER diff --git a/compiler/testData/diagnostics/tests/generics/innerClasses/qualifiedOuter.fir.kt b/compiler/testData/diagnostics/tests/generics/innerClasses/qualifiedOuter.fir.kt index 0b3c53ddefe..e365762a123 100644 --- a/compiler/testData/diagnostics/tests/generics/innerClasses/qualifiedOuter.fir.kt +++ b/compiler/testData/diagnostics/tests/generics/innerClasses/qualifiedOuter.fir.kt @@ -7,7 +7,7 @@ class Outer { fun foo(x: Outer.Inner, y: Outer.Inner, z: Inner) { var inner = Inner() x.checkType { _() } - x.checkType { _.Inner>() } + x.checkType { _.Inner>() } z.checkType { _() } z.checkType { _.Inner>() } diff --git a/compiler/testData/diagnostics/tests/generics/innerClasses/simple.fir.kt b/compiler/testData/diagnostics/tests/generics/innerClasses/simple.fir.kt index ed3d9809b04..50641cc1111 100644 --- a/compiler/testData/diagnostics/tests/generics/innerClasses/simple.fir.kt +++ b/compiler/testData/diagnostics/tests/generics/innerClasses/simple.fir.kt @@ -25,8 +25,8 @@ fun main() { checkSubtype.Inner>(outer.bar()) checkSubtype.Inner>(outer.Inner()) - checkSubtype.Inner>(outer.bar()) - checkSubtype.Inner>(outer.Inner()) + checkSubtype.Inner>(outer.bar()) + checkSubtype.Inner>(outer.Inner()) outer.set(outer.bar()) outer.set(outer.Inner()) diff --git a/compiler/testData/diagnostics/tests/generics/innerClasses/simpleOutUseSite.fir.kt b/compiler/testData/diagnostics/tests/generics/innerClasses/simpleOutUseSite.fir.kt index b894c10f9f9..c16e0722bb5 100644 --- a/compiler/testData/diagnostics/tests/generics/innerClasses/simpleOutUseSite.fir.kt +++ b/compiler/testData/diagnostics/tests/generics/innerClasses/simpleOutUseSite.fir.kt @@ -29,9 +29,9 @@ fun main() { checkSubtype.Inner>(outer.bar()) checkSubtype.Inner>(outer.Inner()) - outer.set(outer.bar()) - outer.set(outer.Inner()) + outer.set(outer.bar()) + outer.set(outer.Inner()) val x: Outer.Inner = factoryString() - outer.set(x) + outer.set(x) } diff --git a/compiler/testData/diagnostics/tests/generics/innerClasses/substitutedMemberScope.fir.kt b/compiler/testData/diagnostics/tests/generics/innerClasses/substitutedMemberScope.fir.kt index 914dfb898c7..af6d575ba72 100644 --- a/compiler/testData/diagnostics/tests/generics/innerClasses/substitutedMemberScope.fir.kt +++ b/compiler/testData/diagnostics/tests/generics/innerClasses/substitutedMemberScope.fir.kt @@ -36,13 +36,13 @@ fun topLevel(): Outer = null!! fun foo() { val strInt: Outer.Inner = Outer().Inner() - strInt.foo().checkType { _() } - strInt.baz().checkType { _() } + strInt.foo().checkType { _() } + strInt.baz().checkType { _() } - strInt.instance().setE("") - strInt.instance().outerE().checkType { _() } + strInt.instance().setE("") + strInt.instance().outerE().checkType { _() } - strInt.instance().Inner().checkType { _.Inner>() } + strInt.instance().Inner().checkType { _.Inner>() } Outer().setInner(strInt) Outer().setInner(strInt) diff --git a/compiler/testData/diagnostics/tests/inference/substitutions/substitutionIntoAnonymousClass.fir.kt b/compiler/testData/diagnostics/tests/inference/substitutions/substitutionIntoAnonymousClass.fir.kt index 718e458fe96..89310e995d3 100644 --- a/compiler/testData/diagnostics/tests/inference/substitutions/substitutionIntoAnonymousClass.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/substitutions/substitutionIntoAnonymousClass.fir.kt @@ -5,7 +5,7 @@ class Test { } } fun test() { - 1.self().bar() + 1 + 1.self().bar() + 1 } } diff --git a/compiler/testData/diagnostics/tests/j+k/genericConstructor/innerClass.fir.kt b/compiler/testData/diagnostics/tests/j+k/genericConstructor/innerClass.fir.kt index 0e66f764eab..c867e5747d2 100644 --- a/compiler/testData/diagnostics/tests/j+k/genericConstructor/innerClass.fir.kt +++ b/compiler/testData/diagnostics/tests/j+k/genericConstructor/innerClass.fir.kt @@ -10,8 +10,8 @@ public class Outer { // FILE: main.kt fun test(x: List, y: List) { - Outer().Inner("", y, 1) checkType { _.Inner>() } - Outer().Inner("", y, 1) checkType { _.Inner>() } + Outer().Inner("", y, 1) checkType { _.Inner>() } + Outer().Inner("", y, 1) checkType { _.Inner>() } Outer().Inner("", x, 1) checkType { _.Inner>() } Outer().Inner("", x, 1) diff --git a/compiler/testData/diagnostics/tests/secondaryConstructors/constructorInObject.fir.kt b/compiler/testData/diagnostics/tests/secondaryConstructors/constructorInObject.fir.kt index 6de7a0bbdb8..9c729568897 100644 --- a/compiler/testData/diagnostics/tests/secondaryConstructors/constructorInObject.fir.kt +++ b/compiler/testData/diagnostics/tests/secondaryConstructors/constructorInObject.fir.kt @@ -5,7 +5,7 @@ object A { enum class B { X() { - constructor() + constructor() } } diff --git a/compiler/testData/ir/irText/declarations/parameters/class.fir.txt b/compiler/testData/ir/irText/declarations/parameters/class.fir.txt index caea0239a54..5bbe28a39f1 100644 --- a/compiler/testData/ir/irText/declarations/parameters/class.fir.txt +++ b/compiler/testData/ir/irText/declarations/parameters/class.fir.txt @@ -59,10 +59,10 @@ FILE fqName: fileName:/class.kt public open fun toString (): kotlin.String declared in kotlin.Any $this: VALUE_PARAMETER name: type:kotlin.Any CLASS CLASS name:TestInner modality:FINAL visibility:public [inner] superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test.TestInner.Test.TestInner> + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test.TestInner.Test.TestInner, T0 of .Test> TYPE_PARAMETER name:T2 index:0 variance: superTypes:[kotlin.Any?] - CONSTRUCTOR visibility:public <> ($this:.Test.TestInner.Test.TestInner>) returnType:.Test.TestInner.Test.TestInner> [primary] - $outer: VALUE_PARAMETER name: type:.Test.TestInner.Test.TestInner> + CONSTRUCTOR visibility:public <> ($this:.Test.TestInner.Test.TestInner, T0 of .Test>) returnType:.Test.TestInner.Test.TestInner, T0 of .Test> [primary] + $outer: VALUE_PARAMETER name: type:.Test.TestInner.Test.TestInner, T0 of .Test> BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:TestInner modality:FINAL visibility:public [inner] superTypes:[kotlin.Any]' diff --git a/compiler/testData/ir/irText/declarations/parameters/genericInnerClass.fir.txt b/compiler/testData/ir/irText/declarations/parameters/genericInnerClass.fir.txt index dececb29b4f..a525538afee 100644 --- a/compiler/testData/ir/irText/declarations/parameters/genericInnerClass.fir.txt +++ b/compiler/testData/ir/irText/declarations/parameters/genericInnerClass.fir.txt @@ -7,15 +7,15 @@ FILE fqName: fileName:/genericInnerClass.kt DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Outer modality:FINAL visibility:public superTypes:[kotlin.Any]' CLASS CLASS name:Inner modality:FINAL visibility:public [inner] superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Outer.Inner.Outer.Inner> + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Outer.Inner.Outer.Inner, T1 of .Outer> TYPE_PARAMETER name:T2 index:0 variance: superTypes:[kotlin.Any?] - CONSTRUCTOR visibility:public <> ($this:.Outer.Inner.Outer.Inner>) returnType:.Outer.Inner.Outer.Inner> [primary] - $outer: VALUE_PARAMETER name: type:.Outer.Inner.Outer.Inner> + CONSTRUCTOR visibility:public <> ($this:.Outer.Inner.Outer.Inner, T1 of .Outer>) returnType:.Outer.Inner.Outer.Inner, T1 of .Outer> [primary] + $outer: VALUE_PARAMETER name: type:.Outer.Inner.Outer.Inner, T1 of .Outer> BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Inner modality:FINAL visibility:public [inner] superTypes:[kotlin.Any]' - FUN name:foo visibility:public modality:FINAL <> ($this:.Outer.Inner.Outer.Inner>, x1:T1 of .Outer, x2:T2 of .Outer.Inner) returnType:kotlin.Unit - $this: VALUE_PARAMETER name: type:.Outer.Inner.Outer.Inner> + FUN name:foo visibility:public modality:FINAL <> ($this:.Outer.Inner.Outer.Inner, T1 of .Outer>, x1:T1 of .Outer, x2:T2 of .Outer.Inner) returnType:kotlin.Unit + $this: VALUE_PARAMETER name: type:.Outer.Inner.Outer.Inner, T1 of .Outer> VALUE_PARAMETER name:x1 index:0 type:T1 of .Outer VALUE_PARAMETER name:x2 index:1 type:T2 of .Outer.Inner BLOCK_BODY diff --git a/compiler/testData/ir/irText/expressions/callableReferences/boundInnerGenericConstructor.fir.txt b/compiler/testData/ir/irText/expressions/callableReferences/boundInnerGenericConstructor.fir.txt index a844d62e69b..a4cf1bd281a 100644 --- a/compiler/testData/ir/irText/expressions/callableReferences/boundInnerGenericConstructor.fir.txt +++ b/compiler/testData/ir/irText/expressions/callableReferences/boundInnerGenericConstructor.fir.txt @@ -7,10 +7,10 @@ FILE fqName:test fileName:/boundInnerGenericConstructor.kt DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Foo modality:FINAL visibility:public superTypes:[kotlin.Any]' CLASS CLASS name:Inner modality:FINAL visibility:public [inner] superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:test.Foo.Inner

+ $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:test.Foo.Inner

TYPE_PARAMETER name:P index:0 variance: superTypes:[kotlin.Any?] - CONSTRUCTOR visibility:public <> ($this:test.Foo.Inner

, a:T of test.Foo, b:P of test.Foo.Inner) returnType:test.Foo.Inner

[primary] - $outer: VALUE_PARAMETER name: type:test.Foo.Inner

+ CONSTRUCTOR visibility:public <> ($this:test.Foo.Inner

, a:T of test.Foo, b:P of test.Foo.Inner) returnType:test.Foo.Inner

[primary] + $outer: VALUE_PARAMETER name: type:test.Foo.Inner

VALUE_PARAMETER name:a index:0 type:T of test.Foo VALUE_PARAMETER name:b index:1 type:P of test.Foo.Inner BLOCK_BODY @@ -20,24 +20,24 @@ FILE fqName:test fileName:/boundInnerGenericConstructor.kt FIELD PROPERTY_BACKING_FIELD name:a type:T of test.Foo visibility:private [final] EXPRESSION_BODY GET_VAR 'a: T of test.Foo declared in test.Foo.Inner.' type=T of test.Foo origin=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:test.Foo.Inner

) returnType:T of test.Foo + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:test.Foo.Inner

) returnType:T of test.Foo correspondingProperty: PROPERTY name:a visibility:public modality:FINAL [val] - $this: VALUE_PARAMETER name: type:test.Foo.Inner

+ $this: VALUE_PARAMETER name: type:test.Foo.Inner

BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun (): T of test.Foo declared in test.Foo.Inner' GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:a type:T of test.Foo visibility:private [final]' type=T of test.Foo origin=null - receiver: GET_VAR ': test.Foo.Inner

declared in test.Foo.Inner.' type=test.Foo.Inner

origin=null + receiver: GET_VAR ': test.Foo.Inner

declared in test.Foo.Inner.' type=test.Foo.Inner

origin=null PROPERTY name:b visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:b type:P of test.Foo.Inner visibility:private [final] EXPRESSION_BODY GET_VAR 'b: P of test.Foo.Inner declared in test.Foo.Inner.' type=P of test.Foo.Inner origin=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:test.Foo.Inner

) returnType:P of test.Foo.Inner + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:test.Foo.Inner

) returnType:P of test.Foo.Inner correspondingProperty: PROPERTY name:b visibility:public modality:FINAL [val] - $this: VALUE_PARAMETER name: type:test.Foo.Inner

+ $this: VALUE_PARAMETER name: type:test.Foo.Inner

BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun (): P of test.Foo.Inner declared in test.Foo.Inner' GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:b type:P of test.Foo.Inner visibility:private [final]' type=P of test.Foo.Inner origin=null - receiver: GET_VAR ': test.Foo.Inner

declared in test.Foo.Inner.' type=test.Foo.Inner

origin=null + receiver: GET_VAR ': test.Foo.Inner

declared in test.Foo.Inner.' type=test.Foo.Inner

origin=null FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any @@ -64,16 +64,16 @@ FILE fqName:test fileName:/boundInnerGenericConstructor.kt overridden: public open fun toString (): kotlin.String declared in kotlin.Any $this: VALUE_PARAMETER name: type:kotlin.Any - FUN name:foo visibility:public modality:FINAL (a:A of test.foo, b:B of test.foo, x:kotlin.Function2>) returnType:test.Foo.Inner [inline] + FUN name:foo visibility:public modality:FINAL (a:A of test.foo, b:B of test.foo, x:kotlin.Function2>) returnType:test.Foo.Inner [inline] TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] TYPE_PARAMETER name:B index:1 variance: superTypes:[kotlin.Any?] VALUE_PARAMETER name:a index:0 type:A of test.foo VALUE_PARAMETER name:b index:1 type:B of test.foo - VALUE_PARAMETER name:x index:2 type:kotlin.Function2> + VALUE_PARAMETER name:x index:2 type:kotlin.Function2> BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun foo (a: A of test.foo, b: B of test.foo, x: kotlin.Function2>): test.Foo.Inner [inline] declared in test' - CALL 'public abstract fun invoke (p1: P1 of kotlin.Function2, p2: P2 of kotlin.Function2): R of kotlin.Function2 [operator] declared in kotlin.Function2' type=test.Foo.Inner origin=INVOKE - $this: GET_VAR 'x: kotlin.Function2> declared in test.foo' type=kotlin.Function2> origin=null + RETURN type=kotlin.Nothing from='public final fun foo (a: A of test.foo, b: B of test.foo, x: kotlin.Function2>): test.Foo.Inner [inline] declared in test' + CALL 'public abstract fun invoke (p1: P1 of kotlin.Function2, p2: P2 of kotlin.Function2): R of kotlin.Function2 [operator] declared in kotlin.Function2' type=test.Foo.Inner origin=INVOKE + $this: GET_VAR 'x: kotlin.Function2> declared in test.foo' type=kotlin.Function2> origin=null p1: GET_VAR 'a: A of test.foo declared in test.foo' type=A of test.foo origin=null p2: GET_VAR 'b: B of test.foo declared in test.foo' type=B of test.foo origin=null FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String @@ -81,14 +81,18 @@ FILE fqName:test fileName:/boundInnerGenericConstructor.kt VAR name:z type:test.Foo [val] CONSTRUCTOR_CALL 'public constructor () [primary] declared in test.Foo' type=test.Foo origin=null : kotlin.String - VAR name:foo type:IrErrorType [val] - ERROR_CALL 'Unresolved reference: #' type=IrErrorType - CONST String type=kotlin.String value="O" - CONST String type=kotlin.String value="K" - FUNCTION_REFERENCE 'public constructor (a: T of test.Foo, b: P of test.Foo.Inner) [primary] declared in test.Foo.Inner' type=kotlin.reflect.KFunction2> origin=null reflectionTarget= -

: kotlin.Any? + VAR name:foo type:test.Foo.Inner [val] + CALL 'public final fun foo (a: A of test.foo, b: B of test.foo, x: kotlin.Function2>): test.Foo.Inner [inline] declared in test' type=test.Foo.Inner origin=null + : kotlin.String + : kotlin.String + a: CONST String type=kotlin.String value="O" + b: CONST String type=kotlin.String value="K" + x: FUNCTION_REFERENCE 'public constructor (a: T of test.Foo, b: P of test.Foo.Inner) [primary] declared in test.Foo.Inner' type=kotlin.reflect.KFunction2> origin=null reflectionTarget= +

: kotlin.String $this: GET_VAR 'val z: test.Foo [val] declared in test.box' type=test.Foo origin=null RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in test' - CALL 'public final fun plus (other: kotlin.Any?): kotlin.String [operator] declared in kotlin' type=kotlin.String origin=PLUS - $receiver: ERROR_CALL 'Unresolved reference: #' type=IrErrorType - other: ERROR_CALL 'Unresolved reference: #' type=IrErrorType + CALL 'public final fun plus (other: kotlin.Any?): kotlin.String [operator] declared in kotlin.String' type=kotlin.String origin=PLUS + $this: CALL 'public final fun (): T of test.Foo declared in test.Foo.Inner' type=kotlin.String origin=GET_PROPERTY + $this: GET_VAR 'val foo: test.Foo.Inner [val] declared in test.box' type=test.Foo.Inner origin=null + other: CALL 'public final fun (): P of test.Foo.Inner declared in test.Foo.Inner' type=kotlin.String origin=GET_PROPERTY + $this: GET_VAR 'val foo: test.Foo.Inner [val] declared in test.box' type=test.Foo.Inner origin=null diff --git a/compiler/testData/ir/irText/expressions/constructorWithOwnTypeParametersCall.fir.txt b/compiler/testData/ir/irText/expressions/constructorWithOwnTypeParametersCall.fir.txt index 148b152f143..c8e380d909e 100644 --- a/compiler/testData/ir/irText/expressions/constructorWithOwnTypeParametersCall.fir.txt +++ b/compiler/testData/ir/irText/expressions/constructorWithOwnTypeParametersCall.fir.txt @@ -1,8 +1,8 @@ FILE fqName: fileName:/constructorWithOwnTypeParametersCall.kt - FUN name:testKotlin visibility:public modality:FINAL <> () returnType:.K1.K2 + FUN name:testKotlin visibility:public modality:FINAL <> () returnType:.K1.K2 BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun testKotlin (): .K1.K2 declared in ' - CONSTRUCTOR_CALL 'public constructor () [primary] declared in .K1.K2' type=.K1.K2 origin=null + RETURN type=kotlin.Nothing from='public final fun testKotlin (): .K1.K2 declared in ' + CONSTRUCTOR_CALL 'public constructor () [primary] declared in .K1.K2' type=.K1.K2 origin=null : kotlin.String $outer: CONSTRUCTOR_CALL 'public constructor () [primary] declared in .K1' type=.K1 origin=null : kotlin.Int @@ -18,10 +18,10 @@ FILE fqName: fileName:/constructorWithOwnTypeParametersCall.kt DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:K1 modality:FINAL visibility:public superTypes:[kotlin.Any]' CLASS CLASS name:K2 modality:FINAL visibility:public [inner] superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.K1.K2.K1.K2> + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.K1.K2.K1.K2, T1 of .K1> TYPE_PARAMETER name:T2 index:0 variance: superTypes:[kotlin.CharSequence] - CONSTRUCTOR visibility:public <> ($this:.K1.K2.K1.K2>) returnType:.K1.K2.K1.K2> [primary] - $outer: VALUE_PARAMETER name: type:.K1.K2.K1.K2> + CONSTRUCTOR visibility:public <> ($this:.K1.K2.K1.K2, T1 of .K1>) returnType:.K1.K2.K1.K2, T1 of .K1> [primary] + $outer: VALUE_PARAMETER name: type:.K1.K2.K1.K2, T1 of .K1> BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:K2 modality:FINAL visibility:public [inner] superTypes:[kotlin.Any]' diff --git a/compiler/testData/ir/irText/expressions/sam/samConversionInGenericConstructorCall_NI.fir.txt b/compiler/testData/ir/irText/expressions/sam/samConversionInGenericConstructorCall_NI.fir.txt index 56374da4364..0de1acb2464 100644 --- a/compiler/testData/ir/irText/expressions/sam/samConversionInGenericConstructorCall_NI.fir.txt +++ b/compiler/testData/ir/irText/expressions/sam/samConversionInGenericConstructorCall_NI.fir.txt @@ -1,11 +1,15 @@ FILE fqName: fileName:/samConversionInGenericConstructorCall_NI.kt - FUN name:test3 visibility:public modality:FINAL <> (f1:kotlin.Function1, f2:kotlin.Function1) returnType:IrErrorType + FUN name:test3 visibility:public modality:FINAL <> (f1:kotlin.Function1, f2:kotlin.Function1) returnType:.C.D VALUE_PARAMETER name:f1 index:0 type:kotlin.Function1 VALUE_PARAMETER name:f2 index:1 type:kotlin.Function1 BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun test3 (f1: kotlin.Function1, f2: kotlin.Function1): IrErrorType declared in ' - ERROR_CALL 'Unresolved reference: #' type=IrErrorType - GET_VAR 'f2: kotlin.Function1 declared in .test3' type=kotlin.Function1 origin=null + RETURN type=kotlin.Nothing from='public final fun test3 (f1: kotlin.Function1, f2: kotlin.Function1): .C.D declared in ' + CONSTRUCTOR_CALL 'public constructor (jxy: .J.C?, Y of .C.D?>?) declared in .C.D' type=.C.D origin=null + : kotlin.Int? + $outer: CONSTRUCTOR_CALL 'public constructor (jxx: .J.C?, X of .C?>?) declared in .C' type=.C origin=null + : kotlin.String? + jxx: GET_VAR 'f1: kotlin.Function1 declared in .test3' type=kotlin.Function1 origin=null + jxy: GET_VAR 'f2: kotlin.Function1 declared in .test3' type=kotlin.Function1 origin=null CLASS CLASS name:Outer modality:FINAL visibility:public superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Outer.Outer> TYPE_PARAMETER name:T1 index:0 variance: superTypes:[kotlin.Any?] @@ -26,10 +30,10 @@ FILE fqName: fileName:/samConversionInGenericConstructorCall_NI.kt GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:j11 type:.J.Outer, T1 of .Outer> visibility:private [final]' type=.J.Outer, T1 of .Outer> origin=null receiver: GET_VAR ': .Outer.Outer> declared in .Outer.' type=.Outer.Outer> origin=null CLASS CLASS name:Inner modality:FINAL visibility:public [inner] superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Outer.Inner.Outer.Inner> + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Outer.Inner.Outer.Inner, T1 of .Outer> TYPE_PARAMETER name:T2 index:0 variance: superTypes:[kotlin.Any?] - CONSTRUCTOR visibility:public <> ($this:.Outer.Inner.Outer.Inner>, j12:.J.Outer, T2 of .Outer.Inner>) returnType:.Outer.Inner.Outer.Inner> [primary] - $outer: VALUE_PARAMETER name: type:.Outer.Inner.Outer.Inner> + CONSTRUCTOR visibility:public <> ($this:.Outer.Inner.Outer.Inner, T1 of .Outer>, j12:.J.Outer, T2 of .Outer.Inner>) returnType:.Outer.Inner.Outer.Inner, T1 of .Outer> [primary] + $outer: VALUE_PARAMETER name: type:.Outer.Inner.Outer.Inner, T1 of .Outer> VALUE_PARAMETER name:j12 index:0 type:.J.Outer, T2 of .Outer.Inner> BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' @@ -38,13 +42,13 @@ FILE fqName: fileName:/samConversionInGenericConstructorCall_NI.kt FIELD PROPERTY_BACKING_FIELD name:j12 type:.J.Outer, T2 of .Outer.Inner> visibility:private [final] EXPRESSION_BODY GET_VAR 'j12: .J.Outer, T2 of .Outer.Inner> declared in .Outer.Inner.' type=.J.Outer, T2 of .Outer.Inner> origin=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.Outer.Inner.Outer.Inner>) returnType:.J.Outer, T2 of .Outer.Inner> + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.Outer.Inner.Outer.Inner, T1 of .Outer>) returnType:.J.Outer, T2 of .Outer.Inner> correspondingProperty: PROPERTY name:j12 visibility:public modality:FINAL [val] - $this: VALUE_PARAMETER name: type:.Outer.Inner.Outer.Inner> + $this: VALUE_PARAMETER name: type:.Outer.Inner.Outer.Inner, T1 of .Outer> BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun (): .J.Outer, T2 of .Outer.Inner> declared in .Outer.Inner' GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:j12 type:.J.Outer, T2 of .Outer.Inner> visibility:private [final]' type=.J.Outer, T2 of .Outer.Inner> origin=null - receiver: GET_VAR ': .Outer.Inner.Outer.Inner> declared in .Outer.Inner.' type=.Outer.Inner.Outer.Inner> origin=null + receiver: GET_VAR ': .Outer.Inner.Outer.Inner, T1 of .Outer> declared in .Outer.Inner.' type=.Outer.Inner.Outer.Inner, T1 of .Outer> origin=null FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any @@ -71,13 +75,17 @@ FILE fqName: fileName:/samConversionInGenericConstructorCall_NI.kt overridden: public open fun toString (): kotlin.String declared in kotlin.Any $this: VALUE_PARAMETER name: type:kotlin.Any - FUN name:test4 visibility:public modality:FINAL <> (f:kotlin.Function1, g:kotlin.Function1) returnType:IrErrorType + FUN name:test4 visibility:public modality:FINAL <> (f:kotlin.Function1, g:kotlin.Function1) returnType:.Outer.Inner VALUE_PARAMETER name:f index:0 type:kotlin.Function1 VALUE_PARAMETER name:g index:1 type:kotlin.Function1 BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun test4 (f: kotlin.Function1, g: kotlin.Function1): IrErrorType declared in ' - ERROR_CALL 'Unresolved reference: #' type=IrErrorType - GET_VAR 'g: kotlin.Function1 declared in .test4' type=kotlin.Function1 origin=null + RETURN type=kotlin.Nothing from='public final fun test4 (f: kotlin.Function1, g: kotlin.Function1): .Outer.Inner declared in ' + CONSTRUCTOR_CALL 'public constructor (j12: .J.Outer, T2 of .Outer.Inner>) [primary] declared in .Outer.Inner' type=.Outer.Inner origin=null + : kotlin.Any? + $outer: CONSTRUCTOR_CALL 'public constructor (j11: .J.Outer, T1 of .Outer>) [primary] declared in .Outer' type=.Outer origin=null + : kotlin.String? + j11: GET_VAR 'f: kotlin.Function1 declared in .test4' type=kotlin.Function1 origin=null + j12: GET_VAR 'g: kotlin.Function1 declared in .test4' type=kotlin.Function1 origin=null FUN name:testGenericJavaCtor1 visibility:public modality:FINAL <> (f:kotlin.Function1) returnType:.G VALUE_PARAMETER name:f index:0 type:kotlin.Function1 BLOCK_BODY diff --git a/compiler/testData/ir/irText/expressions/specializedTypeAliasConstructorCall.fir.txt b/compiler/testData/ir/irText/expressions/specializedTypeAliasConstructorCall.fir.txt index f515d163629..1f54e62f617 100644 --- a/compiler/testData/ir/irText/expressions/specializedTypeAliasConstructorCall.fir.txt +++ b/compiler/testData/ir/irText/expressions/specializedTypeAliasConstructorCall.fir.txt @@ -35,5 +35,5 @@ FILE fqName: fileName:/specializedTypeAliasConstructorCall.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test (): .Cell declared in ' CONSTRUCTOR_CALL 'public constructor (value: T of .Cell) [primary] declared in .Cell' type=.Cell origin=null - : + : kotlin.Any? value: CONST Int type=kotlin.Int value=42 diff --git a/compiler/testData/ir/irText/expressions/thisOfGenericOuterClass.fir.txt b/compiler/testData/ir/irText/expressions/thisOfGenericOuterClass.fir.txt index 61ebddf5faf..6f22cae4063 100644 --- a/compiler/testData/ir/irText/expressions/thisOfGenericOuterClass.fir.txt +++ b/compiler/testData/ir/irText/expressions/thisOfGenericOuterClass.fir.txt @@ -19,9 +19,9 @@ FILE fqName: fileName:/thisOfGenericOuterClass.kt GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:T of .Outer visibility:private [final]' type=T of .Outer origin=null receiver: GET_VAR ': .Outer.Outer> declared in .Outer.' type=.Outer.Outer> origin=null CLASS CLASS name:Inner modality:OPEN visibility:public [inner] superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Outer.Inner - CONSTRUCTOR visibility:public <> ($this:.Outer.Inner, y:kotlin.Int) returnType:.Outer.Inner [primary] - $outer: VALUE_PARAMETER name: type:.Outer.Inner + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Outer.Inner.Outer> + CONSTRUCTOR visibility:public <> ($this:.Outer.Inner.Outer>, y:kotlin.Int) returnType:.Outer.Inner.Outer> [primary] + $outer: VALUE_PARAMETER name: type:.Outer.Inner.Outer> VALUE_PARAMETER name:y index:0 type:kotlin.Int BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' @@ -30,13 +30,13 @@ FILE fqName: fileName:/thisOfGenericOuterClass.kt FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.Int visibility:private [final] EXPRESSION_BODY GET_VAR 'y: kotlin.Int declared in .Outer.Inner.' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.Outer.Inner) returnType:kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.Outer.Inner.Outer>) returnType:kotlin.Int correspondingProperty: PROPERTY name:y visibility:public modality:FINAL [val] - $this: VALUE_PARAMETER name: type:.Outer.Inner + $this: VALUE_PARAMETER name: type:.Outer.Inner.Outer> BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in .Outer.Inner' GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null - receiver: GET_VAR ': .Outer.Inner declared in .Outer.Inner.' type=.Outer.Inner origin=null + receiver: GET_VAR ': .Outer.Inner.Outer> declared in .Outer.Inner.' type=.Outer.Inner.Outer> origin=null FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any diff --git a/compiler/testData/ir/irText/types/genericDelegatedDeepProperty.fir.txt b/compiler/testData/ir/irText/types/genericDelegatedDeepProperty.fir.txt index a83bf29b8eb..b6e2ab73a16 100644 --- a/compiler/testData/ir/irText/types/genericDelegatedDeepProperty.fir.txt +++ b/compiler/testData/ir/irText/types/genericDelegatedDeepProperty.fir.txt @@ -196,58 +196,58 @@ FILE fqName: fileName:/genericDelegatedDeepProperty.kt public open fun toString (): kotlin.String declared in kotlin.Any $this: VALUE_PARAMETER name: type:kotlin.Any PROPERTY name:additionalText visibility:public modality:FINAL [delegated,val] - FIELD PROPERTY_DELEGATE name:additionalText$delegate type:.additionalText$delegate. visibility:private [final,static] + FIELD PROPERTY_DELEGATE name:additionalText$delegate type:.additionalText$delegate..> visibility:private [final,static] EXPRESSION_BODY - BLOCK type=.additionalText$delegate. origin=OBJECT_LITERAL + BLOCK type=.additionalText$delegate..> origin=OBJECT_LITERAL CLASS CLASS name: modality:FINAL visibility:local superTypes:[.IDelegate1<.Value., .CR.>>, .P., T of .>>] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.additionalText$delegate. - CONSTRUCTOR visibility:private <> () returnType:.additionalText$delegate. [primary] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.additionalText$delegate..> + CONSTRUCTOR visibility:private <> () returnType:.additionalText$delegate..> [primary] BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name: modality:FINAL visibility:local superTypes:[.IDelegate1<.Value., .CR.>>, .P., T of .>>]' - FUN name:qux11 visibility:public modality:FINAL ($this:.additionalText$delegate., t:F11T of .additionalText$delegate..qux11) returnType:F11T of .additionalText$delegate..qux11 + FUN name:qux11 visibility:public modality:FINAL ($this:.additionalText$delegate..>, t:F11T of .additionalText$delegate..qux11) returnType:F11T of .additionalText$delegate..qux11 TYPE_PARAMETER name:F11T index:0 variance: superTypes:[kotlin.Any?] - $this: VALUE_PARAMETER name: type:.additionalText$delegate. + $this: VALUE_PARAMETER name: type:.additionalText$delegate..> VALUE_PARAMETER name:t index:0 type:F11T of .additionalText$delegate..qux11 BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun qux11 (t: F11T of .additionalText$delegate..qux11): F11T of .additionalText$delegate..qux11 declared in .additionalText$delegate.' GET_VAR 't: F11T of .additionalText$delegate..qux11 declared in .additionalText$delegate..qux11' type=F11T of .additionalText$delegate..qux11 origin=null - FUN name:qux12 visibility:public modality:FINAL ($this:.additionalText$delegate., t:F12T of .additionalText$delegate..qux12) returnType:T of . + FUN name:qux12 visibility:public modality:FINAL ($this:.additionalText$delegate..>, t:F12T of .additionalText$delegate..qux12) returnType:T of . TYPE_PARAMETER name:F12T index:0 variance: superTypes:[.IR.>] - $this: VALUE_PARAMETER name: type:.additionalText$delegate. + $this: VALUE_PARAMETER name: type:.additionalText$delegate..> VALUE_PARAMETER name:t index:0 type:F12T of .additionalText$delegate..qux12 BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun qux12 (t: F12T of .additionalText$delegate..qux12): T of . declared in .additionalText$delegate.' CALL 'public abstract fun foo (): R of .IR declared in .IR' type=T of . origin=null $this: GET_VAR 't: F12T of .additionalText$delegate..qux12 declared in .additionalText$delegate..qux12' type=F12T of .additionalText$delegate..qux12 origin=null PROPERTY name:deepO visibility:private modality:FINAL [delegated,val] - FIELD PROPERTY_DELEGATE name:deepO$delegate type:.additionalText$delegate..deepO$delegate. visibility:private [final] + FIELD PROPERTY_DELEGATE name:deepO$delegate type:.additionalText$delegate..deepO$delegate..> visibility:private [final] EXPRESSION_BODY - BLOCK type=.additionalText$delegate..deepO$delegate. origin=OBJECT_LITERAL + BLOCK type=.additionalText$delegate..deepO$delegate..> origin=OBJECT_LITERAL CLASS CLASS name: modality:FINAL visibility:local superTypes:[.IDelegate1<.Value., .CR.>>, T of .>] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.additionalText$delegate..deepO$delegate. - CONSTRUCTOR visibility:private <> () returnType:.additionalText$delegate..deepO$delegate. [primary] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.additionalText$delegate..deepO$delegate..> + CONSTRUCTOR visibility:private <> () returnType:.additionalText$delegate..deepO$delegate..> [primary] BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name: modality:FINAL visibility:local superTypes:[.IDelegate1<.Value., .CR.>>, T of .>]' - FUN name:getValue visibility:public modality:FINAL <> ($this:.additionalText$delegate..deepO$delegate., t:.Value., .CR.>>, p:kotlin.reflect.KProperty<*>) returnType:T of . - $this: VALUE_PARAMETER name: type:.additionalText$delegate..deepO$delegate. + FUN name:getValue visibility:public modality:FINAL <> ($this:.additionalText$delegate..deepO$delegate..>, t:.Value., .CR.>>, p:kotlin.reflect.KProperty<*>) returnType:T of . + $this: VALUE_PARAMETER name: type:.additionalText$delegate..deepO$delegate..> VALUE_PARAMETER name:t index:0 type:.Value., .CR.>> VALUE_PARAMETER name:p index:1 type:kotlin.reflect.KProperty<*> BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun getValue (t: .Value., .CR.>>, p: kotlin.reflect.KProperty<*>): T of . declared in .additionalText$delegate..deepO$delegate.' CALL 'public final fun (): T of .Value declared in .Value' type=T of . origin=GET_PROPERTY $this: GET_VAR 't: .Value., .CR.>> declared in .additionalText$delegate..deepO$delegate..getValue' type=.Value., .CR.>> origin=null - FUN name:qux21 visibility:public modality:FINAL ($this:.additionalText$delegate..deepO$delegate., t:F21T of .additionalText$delegate..deepO$delegate..qux21) returnType:F21T of .additionalText$delegate..deepO$delegate..qux21 + FUN name:qux21 visibility:public modality:FINAL ($this:.additionalText$delegate..deepO$delegate..>, t:F21T of .additionalText$delegate..deepO$delegate..qux21) returnType:F21T of .additionalText$delegate..deepO$delegate..qux21 TYPE_PARAMETER name:F21T index:0 variance: superTypes:[kotlin.Any?] - $this: VALUE_PARAMETER name: type:.additionalText$delegate..deepO$delegate. + $this: VALUE_PARAMETER name: type:.additionalText$delegate..deepO$delegate..> VALUE_PARAMETER name:t index:0 type:F21T of .additionalText$delegate..deepO$delegate..qux21 BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun qux21 (t: F21T of .additionalText$delegate..deepO$delegate..qux21): F21T of .additionalText$delegate..deepO$delegate..qux21 declared in .additionalText$delegate..deepO$delegate.' GET_VAR 't: F21T of .additionalText$delegate..deepO$delegate..qux21 declared in .additionalText$delegate..deepO$delegate..qux21' type=F21T of .additionalText$delegate..deepO$delegate..qux21 origin=null - FUN name:qux22 visibility:public modality:FINAL ($this:.additionalText$delegate..deepO$delegate., t:F22T of .additionalText$delegate..deepO$delegate..qux22) returnType:T of . + FUN name:qux22 visibility:public modality:FINAL ($this:.additionalText$delegate..deepO$delegate..>, t:F22T of .additionalText$delegate..deepO$delegate..qux22) returnType:T of . TYPE_PARAMETER name:F22T index:0 variance: superTypes:[.IR.>] - $this: VALUE_PARAMETER name: type:.additionalText$delegate..deepO$delegate. + $this: VALUE_PARAMETER name: type:.additionalText$delegate..deepO$delegate..> VALUE_PARAMETER name:t index:0 type:F22T of .additionalText$delegate..deepO$delegate..qux22 BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun qux22 (t: F22T of .additionalText$delegate..deepO$delegate..qux22): T of . declared in .additionalText$delegate..deepO$delegate.' @@ -266,30 +266,30 @@ FILE fqName: fileName:/genericDelegatedDeepProperty.kt overridden: public open fun toString (): kotlin.String declared in kotlin.Any $this: VALUE_PARAMETER name: type:kotlin.Any - CONSTRUCTOR_CALL 'private constructor () [primary] declared in .additionalText$delegate..deepO$delegate.' type=.additionalText$delegate..deepO$delegate. origin=OBJECT_LITERAL - FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.additionalText$delegate., $receiver:.Value., .CR.>>) returnType:T of . + CONSTRUCTOR_CALL 'private constructor () [primary] declared in .additionalText$delegate..deepO$delegate.' type=.additionalText$delegate..deepO$delegate..> origin=OBJECT_LITERAL + FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.additionalText$delegate..>, $receiver:.Value., .CR.>>) returnType:T of . correspondingProperty: PROPERTY name:deepO visibility:private modality:FINAL [delegated,val] - $this: VALUE_PARAMETER name: type:.additionalText$delegate. + $this: VALUE_PARAMETER name: type:.additionalText$delegate..> $receiver: VALUE_PARAMETER name: type:.Value., .CR.>> BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun (): T of . declared in .additionalText$delegate.' CALL 'public final fun getValue (t: .Value., .CR.>>, p: kotlin.reflect.KProperty<*>): T of . declared in .additionalText$delegate..deepO$delegate.' type=T of . origin=null - $this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:deepO$delegate type:.additionalText$delegate..deepO$delegate. visibility:private [final]' type=.additionalText$delegate..deepO$delegate. origin=null - receiver: GET_VAR ': .additionalText$delegate. declared in .additionalText$delegate..' type=.additionalText$delegate. origin=null - t: GET_VAR ': .additionalText$delegate. declared in .additionalText$delegate..' type=.additionalText$delegate. origin=null + $this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:deepO$delegate type:.additionalText$delegate..deepO$delegate..> visibility:private [final]' type=.additionalText$delegate..deepO$delegate..> origin=null + receiver: GET_VAR ': .additionalText$delegate..> declared in .additionalText$delegate..' type=.additionalText$delegate..> origin=null + t: GET_VAR ': .additionalText$delegate..> declared in .additionalText$delegate..' type=.additionalText$delegate..> origin=null p: PROPERTY_REFERENCE 'private final deepO: T of . [delegated,val]' field=null getter='public final fun (): T of . declared in .additionalText$delegate.' setter=null type=kotlin.reflect.KProperty2<.Value., .CR.>>, *, T of .> origin=PROPERTY_REFERENCE_FOR_DELEGATE PROPERTY name:deepK visibility:private modality:FINAL [delegated,val] - FIELD PROPERTY_DELEGATE name:deepK$delegate type:.additionalText$delegate..deepK$delegate. visibility:private [final] + FIELD PROPERTY_DELEGATE name:deepK$delegate type:.additionalText$delegate..deepK$delegate..> visibility:private [final] EXPRESSION_BODY - BLOCK type=.additionalText$delegate..deepK$delegate. origin=OBJECT_LITERAL + BLOCK type=.additionalText$delegate..deepK$delegate..> origin=OBJECT_LITERAL CLASS CLASS name: modality:FINAL visibility:local superTypes:[.IDelegate1<.Value., .CR.>>, T of .>] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.additionalText$delegate..deepK$delegate. - CONSTRUCTOR visibility:private <> () returnType:.additionalText$delegate..deepK$delegate. [primary] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.additionalText$delegate..deepK$delegate..> + CONSTRUCTOR visibility:private <> () returnType:.additionalText$delegate..deepK$delegate..> [primary] BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name: modality:FINAL visibility:local superTypes:[.IDelegate1<.Value., .CR.>>, T of .>]' - FUN name:getValue visibility:public modality:FINAL <> ($this:.additionalText$delegate..deepK$delegate., t:.Value., .CR.>>, p:kotlin.reflect.KProperty<*>) returnType:T of . - $this: VALUE_PARAMETER name: type:.additionalText$delegate..deepK$delegate. + FUN name:getValue visibility:public modality:FINAL <> ($this:.additionalText$delegate..deepK$delegate..>, t:.Value., .CR.>>, p:kotlin.reflect.KProperty<*>) returnType:T of . + $this: VALUE_PARAMETER name: type:.additionalText$delegate..deepK$delegate..> VALUE_PARAMETER name:t index:0 type:.Value., .CR.>> VALUE_PARAMETER name:p index:1 type:kotlin.reflect.KProperty<*> BLOCK_BODY @@ -310,20 +310,20 @@ FILE fqName: fileName:/genericDelegatedDeepProperty.kt overridden: public open fun toString (): kotlin.String declared in kotlin.Any $this: VALUE_PARAMETER name: type:kotlin.Any - CONSTRUCTOR_CALL 'private constructor () [primary] declared in .additionalText$delegate..deepK$delegate.' type=.additionalText$delegate..deepK$delegate. origin=OBJECT_LITERAL - FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.additionalText$delegate., $receiver:.Value., .CR.>>) returnType:T of . + CONSTRUCTOR_CALL 'private constructor () [primary] declared in .additionalText$delegate..deepK$delegate.' type=.additionalText$delegate..deepK$delegate..> origin=OBJECT_LITERAL + FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.additionalText$delegate..>, $receiver:.Value., .CR.>>) returnType:T of . correspondingProperty: PROPERTY name:deepK visibility:private modality:FINAL [delegated,val] - $this: VALUE_PARAMETER name: type:.additionalText$delegate. + $this: VALUE_PARAMETER name: type:.additionalText$delegate..> $receiver: VALUE_PARAMETER name: type:.Value., .CR.>> BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun (): T of . declared in .additionalText$delegate.' CALL 'public final fun getValue (t: .Value., .CR.>>, p: kotlin.reflect.KProperty<*>): T of . declared in .additionalText$delegate..deepK$delegate.' type=T of . origin=null - $this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:deepK$delegate type:.additionalText$delegate..deepK$delegate. visibility:private [final]' type=.additionalText$delegate..deepK$delegate. origin=null - receiver: GET_VAR ': .additionalText$delegate. declared in .additionalText$delegate..' type=.additionalText$delegate. origin=null - t: GET_VAR ': .additionalText$delegate. declared in .additionalText$delegate..' type=.additionalText$delegate. origin=null + $this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:deepK$delegate type:.additionalText$delegate..deepK$delegate..> visibility:private [final]' type=.additionalText$delegate..deepK$delegate..> origin=null + receiver: GET_VAR ': .additionalText$delegate..> declared in .additionalText$delegate..' type=.additionalText$delegate..> origin=null + t: GET_VAR ': .additionalText$delegate..> declared in .additionalText$delegate..' type=.additionalText$delegate..> origin=null p: PROPERTY_REFERENCE 'private final deepK: T of . [delegated,val]' field=null getter='public final fun (): T of . declared in .additionalText$delegate.' setter=null type=kotlin.reflect.KProperty2<.Value., .CR.>>, *, T of .> origin=PROPERTY_REFERENCE_FOR_DELEGATE - FUN name:getValue visibility:public modality:FINAL <> ($this:.additionalText$delegate., t:.Value., .CR.>>, p:kotlin.reflect.KProperty<*>) returnType:.P., T of .> - $this: VALUE_PARAMETER name: type:.additionalText$delegate. + FUN name:getValue visibility:public modality:FINAL <> ($this:.additionalText$delegate..>, t:.Value., .CR.>>, p:kotlin.reflect.KProperty<*>) returnType:.P., T of .> + $this: VALUE_PARAMETER name: type:.additionalText$delegate..> VALUE_PARAMETER name:t index:0 type:.Value., .CR.>> VALUE_PARAMETER name:p index:1 type:kotlin.reflect.KProperty<*> BLOCK_BODY @@ -332,10 +332,10 @@ FILE fqName: fileName:/genericDelegatedDeepProperty.kt : T of . : T of . p1: CALL 'public final fun (): T of . declared in .additionalText$delegate.' type=T of . origin=GET_PROPERTY - $this: GET_VAR ': .additionalText$delegate. declared in .additionalText$delegate..getValue' type=.additionalText$delegate. origin=null + $this: GET_VAR ': .additionalText$delegate..> declared in .additionalText$delegate..getValue' type=.additionalText$delegate..> origin=null $receiver: GET_VAR 't: .Value., .CR.>> declared in .additionalText$delegate..getValue' type=.Value., .CR.>> origin=null p2: CALL 'public final fun (): T of . declared in .additionalText$delegate.' type=T of . origin=GET_PROPERTY - $this: GET_VAR ': .additionalText$delegate. declared in .additionalText$delegate..getValue' type=.additionalText$delegate. origin=null + $this: GET_VAR ': .additionalText$delegate..> declared in .additionalText$delegate..getValue' type=.additionalText$delegate..> origin=null $receiver: GET_VAR 't: .Value., .CR.>> declared in .additionalText$delegate..getValue' type=.Value., .CR.>> origin=null FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: @@ -350,7 +350,7 @@ FILE fqName: fileName:/genericDelegatedDeepProperty.kt overridden: public open fun toString (): kotlin.String declared in kotlin.Any $this: VALUE_PARAMETER name: type:kotlin.Any - CONSTRUCTOR_CALL 'private constructor () [primary] declared in .additionalText$delegate.' type=.additionalText$delegate. origin=OBJECT_LITERAL + CONSTRUCTOR_CALL 'private constructor () [primary] declared in .additionalText$delegate.' type=.additionalText$delegate..> origin=OBJECT_LITERAL FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL ($receiver:.Value., .CR.>>) returnType:.P., T of .> correspondingProperty: PROPERTY name:additionalText visibility:public modality:FINAL [delegated,val] TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] @@ -358,7 +358,7 @@ FILE fqName: fileName:/genericDelegatedDeepProperty.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun (): .P., T of .> declared in ' CALL 'public final fun getValue (t: .Value., .CR.>>, p: kotlin.reflect.KProperty<*>): .P., T of .> declared in .additionalText$delegate.' type=.P., T of .> origin=null - $this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:additionalText$delegate type:.additionalText$delegate. visibility:private [final,static]' type=.additionalText$delegate. origin=null + $this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:additionalText$delegate type:.additionalText$delegate..> visibility:private [final,static]' type=.additionalText$delegate..> origin=null t: GET_VAR ': .Value., .CR.>> declared in .' type=.Value., .CR.>> origin=null p: PROPERTY_REFERENCE 'public final additionalText: .P., T of .> [delegated,val]' field=null getter='public final fun (): .P., T of .> declared in ' setter=null type=kotlin.reflect.KProperty1<.Value., .CR.>>, .P., T of .>> origin=PROPERTY_REFERENCE_FOR_DELEGATE <1>: diff --git a/compiler/testData/ir/irText/types/smartCastOnReceiverOfGenericType.fir.txt b/compiler/testData/ir/irText/types/smartCastOnReceiverOfGenericType.fir.txt index 19783e737d2..912929266fc 100644 --- a/compiler/testData/ir/irText/types/smartCastOnReceiverOfGenericType.fir.txt +++ b/compiler/testData/ir/irText/types/smartCastOnReceiverOfGenericType.fir.txt @@ -30,16 +30,18 @@ FILE fqName: fileName:/smartCastOnReceiverOfGenericType.kt VALUE_PARAMETER name:b index:1 type:kotlin.Any VALUE_PARAMETER name:c index:2 type:kotlin.Any BLOCK_BODY - TYPE_OP type=.Outer.Inner origin=CAST typeOperand=.Outer.Inner + TYPE_OP type=.Outer.Inner origin=CAST typeOperand=.Outer.Inner GET_VAR 'a: kotlin.Any declared in .testInnerClass' type=kotlin.Any origin=null TYPE_OP type=kotlin.Int origin=CAST typeOperand=kotlin.Int GET_VAR 'b: kotlin.Any declared in .testInnerClass' type=kotlin.Any origin=null TYPE_OP type=kotlin.String origin=CAST typeOperand=kotlin.String GET_VAR 'c: kotlin.Any declared in .testInnerClass' type=kotlin.Any origin=null - ERROR_CALL 'Unresolved reference: #' type=IrErrorType - TYPE_OP type=kotlin.Int origin=IMPLICIT_CAST typeOperand=kotlin.Int + CALL 'public final fun use (x1: T1 of .Outer, x2: T2 of .Outer.Inner): kotlin.Unit declared in .Outer.Inner' type=kotlin.Unit origin=null + $this: TYPE_OP type=.Outer.Inner origin=IMPLICIT_CAST typeOperand=.Outer.Inner + GET_VAR 'a: kotlin.Any declared in .testInnerClass' type=kotlin.Any origin=null + x1: TYPE_OP type=kotlin.Int origin=IMPLICIT_CAST typeOperand=kotlin.Int GET_VAR 'b: kotlin.Any declared in .testInnerClass' type=kotlin.Any origin=null - TYPE_OP type=kotlin.String origin=IMPLICIT_CAST typeOperand=kotlin.String + x2: TYPE_OP type=kotlin.String origin=IMPLICIT_CAST typeOperand=kotlin.String GET_VAR 'c: kotlin.Any declared in .testInnerClass' type=kotlin.Any origin=null FUN name:testNonSubstitutedTypeParameter visibility:public modality:FINAL (a:kotlin.Any, b:kotlin.Any) returnType:kotlin.Unit TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] @@ -103,15 +105,15 @@ FILE fqName: fileName:/smartCastOnReceiverOfGenericType.kt DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Outer modality:FINAL visibility:public superTypes:[kotlin.Any]' CLASS CLASS name:Inner modality:FINAL visibility:public [inner] superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Outer.Inner.Outer.Inner> + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Outer.Inner.Outer.Inner, T1 of .Outer> TYPE_PARAMETER name:T2 index:0 variance: superTypes:[kotlin.Any?] - CONSTRUCTOR visibility:public <> ($this:.Outer.Inner.Outer.Inner>) returnType:.Outer.Inner.Outer.Inner> [primary] - $outer: VALUE_PARAMETER name: type:.Outer.Inner.Outer.Inner> + CONSTRUCTOR visibility:public <> ($this:.Outer.Inner.Outer.Inner, T1 of .Outer>) returnType:.Outer.Inner.Outer.Inner, T1 of .Outer> [primary] + $outer: VALUE_PARAMETER name: type:.Outer.Inner.Outer.Inner, T1 of .Outer> BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Inner modality:FINAL visibility:public [inner] superTypes:[kotlin.Any]' - FUN name:use visibility:public modality:FINAL <> ($this:.Outer.Inner.Outer.Inner>, x1:T1 of .Outer, x2:T2 of .Outer.Inner) returnType:kotlin.Unit - $this: VALUE_PARAMETER name: type:.Outer.Inner.Outer.Inner> + FUN name:use visibility:public modality:FINAL <> ($this:.Outer.Inner.Outer.Inner, T1 of .Outer>, x1:T1 of .Outer, x2:T2 of .Outer.Inner) returnType:kotlin.Unit + $this: VALUE_PARAMETER name: type:.Outer.Inner.Outer.Inner, T1 of .Outer> VALUE_PARAMETER name:x1 index:0 type:T1 of .Outer VALUE_PARAMETER name:x2 index:1 type:T2 of .Outer.Inner BLOCK_BODY