diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosticCompilerTestFE10TestdataTestGenerated.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosticCompilerTestFE10TestdataTestGenerated.java index d99064b8492..8f6596e45a2 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosticCompilerTestFE10TestdataTestGenerated.java +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosticCompilerTestFE10TestdataTestGenerated.java @@ -16652,6 +16652,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia runTest("compiler/testData/diagnostics/tests/inference/capturedTypesInSelfType.kt"); } + @Test + @TestMetadata("checkNotNullWithNullableExpectedType.kt") + public void testCheckNotNullWithNullableExpectedType() { + runTest("compiler/testData/diagnostics/tests/inference/checkNotNullWithNullableExpectedType.kt"); + } + @Test @TestMetadata("coerceFunctionLiteralToSuspend.kt") public void testCoerceFunctionLiteralToSuspend() { @@ -17174,6 +17180,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia runTest("compiler/testData/diagnostics/tests/inference/mostSpecificAfterInference.kt"); } + @Test + @TestMetadata("nestedIfWithExpectedType.kt") + public void testNestedIfWithExpectedType() { + runTest("compiler/testData/diagnostics/tests/inference/nestedIfWithExpectedType.kt"); + } + @Test @TestMetadata("NoInferenceFromDeclaredBounds.kt") public void testNoInferenceFromDeclaredBounds() { @@ -18982,6 +18994,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia public void testWrongApproximationWithDefNotNullTypesAndDelegates() { runTest("compiler/testData/diagnostics/tests/inference/constraints/wrongApproximationWithDefNotNullTypesAndDelegates.kt"); } + + @Test + @TestMetadata("wrongExpectedTypeForWhen.kt") + public void testWrongExpectedTypeForWhen() { + runTest("compiler/testData/diagnostics/tests/inference/constraints/wrongExpectedTypeForWhen.kt"); + } } @Nested diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirBlackBoxCodegenBasedTestGenerated.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirBlackBoxCodegenBasedTestGenerated.java index 243bab96ebd..7ab7f8c7be2 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirBlackBoxCodegenBasedTestGenerated.java +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirBlackBoxCodegenBasedTestGenerated.java @@ -23888,6 +23888,12 @@ public class LLFirBlackBoxCodegenBasedTestGenerated extends AbstractLLFirBlackBo runTest("compiler/testData/codegen/box/inference/kt51040.kt"); } + @Test + @TestMetadata("kt65882.kt") + public void testKt65882() { + runTest("compiler/testData/codegen/box/inference/kt65882.kt"); + } + @Test @TestMetadata("lambdaWithStarReturn.kt") public void testLambdaWithStarReturn() { diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated.java index 13b2a3cc796..f923b4db446 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated.java +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated.java @@ -16652,6 +16652,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated runTest("compiler/testData/diagnostics/tests/inference/capturedTypesInSelfType.kt"); } + @Test + @TestMetadata("checkNotNullWithNullableExpectedType.kt") + public void testCheckNotNullWithNullableExpectedType() { + runTest("compiler/testData/diagnostics/tests/inference/checkNotNullWithNullableExpectedType.kt"); + } + @Test @TestMetadata("coerceFunctionLiteralToSuspend.kt") public void testCoerceFunctionLiteralToSuspend() { @@ -17174,6 +17180,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated runTest("compiler/testData/diagnostics/tests/inference/mostSpecificAfterInference.kt"); } + @Test + @TestMetadata("nestedIfWithExpectedType.kt") + public void testNestedIfWithExpectedType() { + runTest("compiler/testData/diagnostics/tests/inference/nestedIfWithExpectedType.kt"); + } + @Test @TestMetadata("NoInferenceFromDeclaredBounds.kt") public void testNoInferenceFromDeclaredBounds() { @@ -18982,6 +18994,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated public void testWrongApproximationWithDefNotNullTypesAndDelegates() { runTest("compiler/testData/diagnostics/tests/inference/constraints/wrongApproximationWithDefNotNullTypesAndDelegates.kt"); } + + @Test + @TestMetadata("wrongExpectedTypeForWhen.kt") + public void testWrongExpectedTypeForWhen() { + runTest("compiler/testData/diagnostics/tests/inference/constraints/wrongExpectedTypeForWhen.kt"); + } } @Nested diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirReversedBlackBoxCodegenBasedTestGenerated.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirReversedBlackBoxCodegenBasedTestGenerated.java index d30ae1018cb..e2d1ebd84b9 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirReversedBlackBoxCodegenBasedTestGenerated.java +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirReversedBlackBoxCodegenBasedTestGenerated.java @@ -23888,6 +23888,12 @@ public class LLFirReversedBlackBoxCodegenBasedTestGenerated extends AbstractLLFi runTest("compiler/testData/codegen/box/inference/kt51040.kt"); } + @Test + @TestMetadata("kt65882.kt") + public void testKt65882() { + runTest("compiler/testData/codegen/box/inference/kt65882.kt"); + } + @Test @TestMetadata("lambdaWithStarReturn.kt") public void testLambdaWithStarReturn() { diff --git a/compiler/fir/analysis-tests/testData/resolve/checkers/complexConflictingProjections.kt b/compiler/fir/analysis-tests/testData/resolve/checkers/complexConflictingProjections.kt index 7479f985095..eeb571f4af0 100644 --- a/compiler/fir/analysis-tests/testData/resolve/checkers/complexConflictingProjections.kt +++ b/compiler/fir/analysis-tests/testData/resolve/checkers/complexConflictingProjections.kt @@ -7,7 +7,7 @@ class QuxBar>>(var f: T2) class Quux { fun test(): Unit { - val x: QuxBazBarin T>>> = null!! + val x: QuxBazBarin T>>> = null!! x.f = null!! } } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/smartcastToNothing.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/smartcastToNothing.dot index 0142d403d6d..59781e4a121 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/smartcastToNothing.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/smartcastToNothing.dot @@ -112,173 +112,173 @@ digraph smartcastToNothing_kt { 35 [label="Enter block"]; 36 [label="Const: Null(null)"]; 37 [label="Check not null: Null(null)!!" style="filled" fillcolor=yellow]; - 38 [label="Stub" style="filled" fillcolor=gray]; - 39 [label="Jump: ^myListOf Null(null)!!" style="filled" fillcolor=gray]; - 40 [label="Stub" style="filled" fillcolor=gray]; - 41 [label="Exit block" style="filled" fillcolor=gray]; + 38 [label="Jump: ^myListOf Null(null)!!"]; + 39 [label="Stub" style="filled" fillcolor=gray]; + 40 [label="Exit block" style="filled" fillcolor=gray]; } - 42 [label="Exit function myListOf" style="filled" fillcolor=gray]; + 41 [label="Exit function myListOf" style="filled" fillcolor=red]; } 34 -> {35}; 35 -> {36}; 36 -> {37}; - 37 -> {38} [style=dotted]; + 37 -> {38}; + 38 -> {41}; 38 -> {39} [style=dotted]; - 39 -> {40 42} [style=dotted]; + 39 -> {40} [style=dotted]; 40 -> {41} [style=dotted]; - 41 -> {42} [style=dotted]; subgraph cluster_12 { color=red - 43 [label="Enter class A" style="filled" fillcolor=red]; + 42 [label="Enter class A" style="filled" fillcolor=red]; subgraph cluster_13 { color=blue - 44 [label="Enter function " style="filled" fillcolor=red]; - 45 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 46 [label="Exit function " style="filled" fillcolor=red]; + 43 [label="Enter function " style="filled" fillcolor=red]; + 44 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 45 [label="Exit function " style="filled" fillcolor=red]; } subgraph cluster_14 { color=blue - 47 [label="Enter property" style="filled" fillcolor=red]; - 48 [label="Const: Int(1)"]; - 49 [label="Exit property" style="filled" fillcolor=red]; + 46 [label="Enter property" style="filled" fillcolor=red]; + 47 [label="Const: Int(1)"]; + 48 [label="Exit property" style="filled" fillcolor=red]; } subgraph cluster_15 { color=blue - 50 [label="Enter property" style="filled" fillcolor=red]; - 51 [label="Const: Boolean(true)"]; - 52 [label="Exit property" style="filled" fillcolor=red]; + 49 [label="Enter property" style="filled" fillcolor=red]; + 50 [label="Const: Boolean(true)"]; + 51 [label="Exit property" style="filled" fillcolor=red]; } - 53 [label="Exit class A" style="filled" fillcolor=red]; + 52 [label="Exit class A" style="filled" fillcolor=red]; } - 43 -> {44} [color=green]; - 43 -> {53} [style=dotted]; - 43 -> {44 47 50} [style=dashed]; + 42 -> {43} [color=green]; + 42 -> {52} [style=dotted]; + 42 -> {43 46 49} [style=dashed]; + 43 -> {44}; 44 -> {45}; - 45 -> {46}; - 46 -> {47} [color=green]; + 45 -> {46} [color=green]; + 46 -> {47}; 47 -> {48}; - 48 -> {49}; - 49 -> {50} [color=green]; + 48 -> {49} [color=green]; + 49 -> {50}; 50 -> {51}; - 51 -> {52}; - 52 -> {53} [color=green]; + 51 -> {52} [color=green]; subgraph cluster_16 { color=red - 54 [label="Enter function test_0" style="filled" fillcolor=red]; + 53 [label="Enter function test_0" style="filled" fillcolor=red]; subgraph cluster_17 { color=blue - 55 [label="Enter block"]; - 56 [label="Const: Null(null)"]; - 57 [label="Variable declaration: lvar s: R|A?|"]; + 54 [label="Enter block"]; + 55 [label="Const: Null(null)"]; + 56 [label="Variable declaration: lvar s: R|A?|"]; subgraph cluster_18 { color=blue - 58 [label="Enter block"]; + 57 [label="Enter block"]; subgraph cluster_19 { color=blue - 59 [label="Function call arguments enter"]; - 60 [label="Access variable R|/results|"]; - 61 [label="Function call arguments exit"]; + 58 [label="Function call arguments enter"]; + 59 [label="Access variable R|/results|"]; + 60 [label="Function call arguments exit"]; } - 62 [label="Function call: R|/results|.R|SubstitutionOverride|>|()" style="filled" fillcolor=yellow]; - 63 [label="Variable declaration: lval : R|kotlin/collections/Iterator|"]; + 61 [label="Function call: R|/results|.R|SubstitutionOverride|>|()" style="filled" fillcolor=yellow]; + 62 [label="Variable declaration: lval : R|kotlin/collections/Iterator|"]; subgraph cluster_20 { color=blue - 64 [label="Enter while loop"]; + 63 [label="Enter while loop"]; subgraph cluster_21 { color=blue - 65 [label="Enter loop condition"]; + 64 [label="Enter loop condition"]; subgraph cluster_22 { color=blue - 66 [label="Function call arguments enter"]; - 67 [label="Access variable R|/|"]; - 68 [label="Function call arguments exit"]; + 65 [label="Function call arguments enter"]; + 66 [label="Access variable R|/|"]; + 67 [label="Function call arguments exit"]; } - 69 [label="Function call: R|/|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 70 [label="Exit loop condition"]; + 68 [label="Function call: R|/|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 69 [label="Exit loop condition"]; } subgraph cluster_23 { color=blue - 71 [label="Enter loop block"]; + 70 [label="Enter loop block"]; subgraph cluster_24 { color=blue - 72 [label="Enter block"]; + 71 [label="Enter block"]; subgraph cluster_25 { color=blue - 73 [label="Function call arguments enter"]; - 74 [label="Access variable R|/|"]; - 75 [label="Function call arguments exit"]; + 72 [label="Function call arguments enter"]; + 73 [label="Access variable R|/|"]; + 74 [label="Function call arguments exit"]; } - 76 [label="Function call: R|/|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 77 [label="Stub" style="filled" fillcolor=gray]; - 78 [label="Variable declaration: lval result: R|kotlin/Nothing|" style="filled" fillcolor=gray]; + 75 [label="Function call: R|/|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 76 [label="Stub" style="filled" fillcolor=gray]; + 77 [label="Variable declaration: lval result: R|kotlin/Nothing|" style="filled" fillcolor=gray]; subgraph cluster_26 { color=blue - 79 [label="Enter block" style="filled" fillcolor=gray]; - 80 [label="Access variable R|/result|" style="filled" fillcolor=gray]; - 81 [label="Stub" style="filled" fillcolor=gray]; - 82 [label="Assignment: R|/s|" style="filled" fillcolor=gray]; + 78 [label="Enter block" style="filled" fillcolor=gray]; + 79 [label="Access variable R|/result|" style="filled" fillcolor=gray]; + 80 [label="Stub" style="filled" fillcolor=gray]; + 81 [label="Assignment: R|/s|" style="filled" fillcolor=gray]; subgraph cluster_27 { color=blue - 83 [label="Enter when" style="filled" fillcolor=gray]; + 82 [label="Enter when" style="filled" fillcolor=gray]; subgraph cluster_28 { color=blue - 84 [label="Enter when branch condition " style="filled" fillcolor=gray]; - 85 [label="Access variable R|/result|" style="filled" fillcolor=gray]; - 86 [label="Stub" style="filled" fillcolor=gray]; - 87 [label="Access variable #" style="filled" fillcolor=gray]; - 88 [label="Exit when branch condition" style="filled" fillcolor=gray]; + 83 [label="Enter when branch condition " style="filled" fillcolor=gray]; + 84 [label="Access variable R|/result|" style="filled" fillcolor=gray]; + 85 [label="Stub" style="filled" fillcolor=gray]; + 86 [label="Access variable #" style="filled" fillcolor=gray]; + 87 [label="Exit when branch condition" style="filled" fillcolor=gray]; } - 89 [label="Synthetic else branch" style="filled" fillcolor=gray]; - 90 [label="Enter when branch result" style="filled" fillcolor=gray]; + 88 [label="Synthetic else branch" style="filled" fillcolor=gray]; + 89 [label="Enter when branch result" style="filled" fillcolor=gray]; subgraph cluster_29 { color=blue - 91 [label="Enter block" style="filled" fillcolor=gray]; - 92 [label="Jump: break@@@[R|/|.R|SubstitutionOverride|()] " style="filled" fillcolor=gray]; - 93 [label="Stub" style="filled" fillcolor=gray]; - 94 [label="Exit block" style="filled" fillcolor=gray]; + 90 [label="Enter block" style="filled" fillcolor=gray]; + 91 [label="Jump: break@@@[R|/|.R|SubstitutionOverride|()] " style="filled" fillcolor=gray]; + 92 [label="Stub" style="filled" fillcolor=gray]; + 93 [label="Exit block" style="filled" fillcolor=gray]; } - 95 [label="Exit when branch result" style="filled" fillcolor=gray]; - 96 [label="Exit when" style="filled" fillcolor=gray]; + 94 [label="Exit when branch result" style="filled" fillcolor=gray]; + 95 [label="Exit when" style="filled" fillcolor=gray]; } - 97 [label="Exit block" style="filled" fillcolor=gray]; + 96 [label="Exit block" style="filled" fillcolor=gray]; } - 98 [label="Exit block" style="filled" fillcolor=gray]; + 97 [label="Exit block" style="filled" fillcolor=gray]; } - 99 [label="Exit loop block" style="filled" fillcolor=gray]; + 98 [label="Exit loop block" style="filled" fillcolor=gray]; } - 100 [label="Exit while loop"]; + 99 [label="Exit while loop"]; } - 101 [label="Exit block"]; + 100 [label="Exit block"]; } - 102 [label="Access variable R|/s|"]; - 103 [label="Enter safe call"]; + 101 [label="Access variable R|/s|"]; + 102 [label="Enter safe call"]; subgraph cluster_30 { color=blue - 104 [label="Function call arguments enter"]; - 105 [label="Postponed enter to lambda"]; + 103 [label="Function call arguments enter"]; + 104 [label="Postponed enter to lambda"]; subgraph cluster_31 { color=blue - 106 [label="Enter function " style="filled" fillcolor=red]; + 105 [label="Enter function " style="filled" fillcolor=red]; subgraph cluster_32 { color=blue - 107 [label="Enter block"]; - 108 [label="Access variable R|/it|"]; - 109 [label="Access variable R|/A.a|"]; - 110 [label="Exit block"]; + 106 [label="Enter block"]; + 107 [label="Access variable R|/it|"]; + 108 [label="Access variable R|/A.a|"]; + 109 [label="Exit block"]; } - 111 [label="Exit function " style="filled" fillcolor=red]; + 110 [label="Exit function " style="filled" fillcolor=red]; } - 112 [label="Function call arguments exit"]; + 111 [label="Function call arguments exit"]; } - 113 [label="Postponed exit from lambda"]; - 114 [label="Function call: $subj$.R|kotlin/let|(...)" style="filled" fillcolor=yellow]; - 115 [label="Exit safe call"]; - 116 [label="Exit block"]; + 112 [label="Postponed exit from lambda"]; + 113 [label="Function call: $subj$.R|kotlin/let|(...)" style="filled" fillcolor=yellow]; + 114 [label="Exit safe call"]; + 115 [label="Exit block"]; } - 117 [label="Exit function test_0" style="filled" fillcolor=red]; + 116 [label="Exit function test_0" style="filled" fillcolor=red]; } + 53 -> {54}; 54 -> {55}; 55 -> {56}; 56 -> {57}; @@ -294,13 +294,13 @@ digraph smartcastToNothing_kt { 66 -> {67}; 67 -> {68}; 68 -> {69}; - 69 -> {70}; - 70 -> {71 100}; + 69 -> {70 99}; + 70 -> {71}; 71 -> {72}; 72 -> {73}; 73 -> {74}; 74 -> {75}; - 75 -> {76}; + 75 -> {76} [style=dotted]; 76 -> {77} [style=dotted]; 77 -> {78} [style=dotted]; 78 -> {79} [style=dotted]; @@ -312,111 +312,111 @@ digraph smartcastToNothing_kt { 84 -> {85} [style=dotted]; 85 -> {86} [style=dotted]; 86 -> {87} [style=dotted]; - 87 -> {88} [style=dotted]; - 88 -> {89 90} [style=dotted]; - 89 -> {96} [style=dotted]; + 87 -> {88 89} [style=dotted]; + 88 -> {95} [style=dotted]; + 89 -> {90} [style=dotted]; 90 -> {91} [style=dotted]; - 91 -> {92} [style=dotted]; - 92 -> {93 100} [style=dotted]; + 91 -> {92 99} [style=dotted]; + 92 -> {93} [style=dotted]; 93 -> {94} [style=dotted]; 94 -> {95} [style=dotted]; 95 -> {96} [style=dotted]; 96 -> {97} [style=dotted]; 97 -> {98} [style=dotted]; - 98 -> {99} [style=dotted]; - 99 -> {65} [color=green style=dotted]; + 98 -> {64} [color=green style=dotted]; + 99 -> {100}; 100 -> {101}; - 101 -> {102}; - 102 -> {103 115}; + 101 -> {102 114}; + 102 -> {103}; 103 -> {104}; - 104 -> {105}; - 105 -> {106 112}; - 105 -> {113} [style=dotted]; - 105 -> {106} [style=dashed]; + 104 -> {105 111}; + 104 -> {112} [style=dotted]; + 104 -> {105} [style=dashed]; + 105 -> {106}; 106 -> {107}; 107 -> {108}; 108 -> {109}; 109 -> {110}; - 110 -> {111}; + 110 -> {112}; 111 -> {113}; - 112 -> {114}; - 113 -> {114} [label="Postponed"]; + 112 -> {113} [label="Postponed"]; + 113 -> {114}; 114 -> {115}; 115 -> {116}; - 116 -> {117}; subgraph cluster_33 { color=red - 118 [label="Enter function test_1" style="filled" fillcolor=red]; + 117 [label="Enter function test_1" style="filled" fillcolor=red]; subgraph cluster_34 { color=blue - 119 [label="Enter block"]; + 118 [label="Enter block"]; subgraph cluster_35 { color=blue - 120 [label="Enter when"]; + 119 [label="Enter when"]; subgraph cluster_36 { color=blue - 121 [label="Enter when branch condition "]; - 122 [label="Access variable R|/a|"]; - 123 [label="Type operator: (R|/a| is R|kotlin/Nothing?|)"]; - 124 [label="Exit when branch condition"]; + 120 [label="Enter when branch condition "]; + 121 [label="Access variable R|/a|"]; + 122 [label="Type operator: (R|/a| is R|kotlin/Nothing?|)"]; + 123 [label="Exit when branch condition"]; } - 125 [label="Synthetic else branch"]; - 126 [label="Enter when branch result"]; + 124 [label="Synthetic else branch"]; + 125 [label="Enter when branch result"]; subgraph cluster_37 { color=blue - 127 [label="Enter block"]; - 128 [label="Access variable R|/a|"]; - 129 [label="Smart cast: R|/a|"]; - 130 [label="Enter safe call"]; - 131 [label="Access variable R|kotlin/String.length|"]; - 132 [label="Exit safe call"]; - 133 [label="Variable declaration: lval b: R|kotlin/Int?|"]; - 134 [label="Exit block"]; + 126 [label="Enter block"]; + 127 [label="Access variable R|/a|"]; + 128 [label="Smart cast: R|/a|"]; + 129 [label="Enter safe call"]; + 130 [label="Access variable R|kotlin/String.length|"]; + 131 [label="Exit safe call"]; + 132 [label="Variable declaration: lval b: R|kotlin/Int?|"]; + 133 [label="Exit block"]; } - 135 [label="Exit when branch result"]; - 136 [label="Exit when"]; + 134 [label="Exit when branch result"]; + 135 [label="Exit when"]; } subgraph cluster_38 { color=blue - 137 [label="Enter when"]; + 136 [label="Enter when"]; subgraph cluster_39 { color=blue - 138 [label="Enter when branch condition "]; - 139 [label="Access variable R|/a|"]; - 140 [label="Type operator: (R|/a| is R|kotlin/Nothing|)"]; - 141 [label="Exit when branch condition"]; + 137 [label="Enter when branch condition "]; + 138 [label="Access variable R|/a|"]; + 139 [label="Type operator: (R|/a| is R|kotlin/Nothing|)"]; + 140 [label="Exit when branch condition"]; } - 142 [label="Synthetic else branch"]; - 143 [label="Enter when branch result"]; + 141 [label="Synthetic else branch"]; + 142 [label="Enter when branch result"]; subgraph cluster_40 { color=blue - 144 [label="Enter block"]; - 145 [label="Access variable R|/a|"]; - 146 [label="Smart cast: R|/a|"]; - 147 [label="Access variable R|kotlin/String.length|"]; - 148 [label="Variable declaration: lval b: R|kotlin/Int|"]; - 149 [label="Exit block"]; + 143 [label="Enter block"]; + 144 [label="Access variable R|/a|"]; + 145 [label="Smart cast: R|/a|"]; + 146 [label="Access variable R|kotlin/String.length|"]; + 147 [label="Variable declaration: lval b: R|kotlin/Int|"]; + 148 [label="Exit block"]; } - 150 [label="Exit when branch result"]; - 151 [label="Exit when"]; + 149 [label="Exit when branch result"]; + 150 [label="Exit when"]; } - 152 [label="Exit block"]; + 151 [label="Exit block"]; } - 153 [label="Exit function test_1" style="filled" fillcolor=red]; + 152 [label="Exit function test_1" style="filled" fillcolor=red]; } + 117 -> {118}; 118 -> {119}; 119 -> {120}; 120 -> {121}; 121 -> {122}; 122 -> {123}; - 123 -> {124}; - 124 -> {125 126}; - 125 -> {136}; + 123 -> {124 125}; + 124 -> {135}; + 125 -> {126}; 126 -> {127}; 127 -> {128}; - 128 -> {129}; - 129 -> {130 132}; + 128 -> {129 131}; + 129 -> {130}; 130 -> {131}; 131 -> {132}; 132 -> {133}; @@ -427,9 +427,9 @@ digraph smartcastToNothing_kt { 137 -> {138}; 138 -> {139}; 139 -> {140}; - 140 -> {141}; - 141 -> {142 143}; - 142 -> {151}; + 140 -> {141 142}; + 141 -> {150}; + 142 -> {143}; 143 -> {144}; 144 -> {145}; 145 -> {146}; @@ -439,6 +439,5 @@ digraph smartcastToNothing_kt { 149 -> {150}; 150 -> {151}; 151 -> {152}; - 152 -> {153}; } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/delegates/delegateWithAnonymousObject.dot b/compiler/fir/analysis-tests/testData/resolveWithStdlib/delegates/delegateWithAnonymousObject.dot index 0ac8f6985ce..5330c190423 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/delegates/delegateWithAnonymousObject.dot +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/delegates/delegateWithAnonymousObject.dot @@ -36,178 +36,178 @@ digraph delegateWithAnonymousObject_kt { 8 [label="Enter block"]; 9 [label="Const: Null(null)"]; 10 [label="Check not null: Null(null)!!" style="filled" fillcolor=yellow]; - 11 [label="Stub" style="filled" fillcolor=gray]; - 12 [label="Jump: ^delegate Null(null)!!" style="filled" fillcolor=gray]; - 13 [label="Stub" style="filled" fillcolor=gray]; - 14 [label="Exit block" style="filled" fillcolor=gray]; + 11 [label="Jump: ^delegate Null(null)!!"]; + 12 [label="Stub" style="filled" fillcolor=gray]; + 13 [label="Exit block" style="filled" fillcolor=gray]; } - 15 [label="Exit function delegate" style="filled" fillcolor=gray]; + 14 [label="Exit function delegate" style="filled" fillcolor=red]; } 7 -> {8}; 8 -> {9}; 9 -> {10}; - 10 -> {11} [style=dotted]; + 10 -> {11}; + 11 -> {14}; 11 -> {12} [style=dotted]; - 12 -> {13 15} [style=dotted]; + 12 -> {13} [style=dotted]; 13 -> {14} [style=dotted]; - 14 -> {15} [style=dotted]; subgraph cluster_5 { color=red - 16 [label="Enter class IssueListView" style="filled" fillcolor=red]; + 15 [label="Enter class IssueListView" style="filled" fillcolor=red]; subgraph cluster_6 { color=blue - 17 [label="Enter function " style="filled" fillcolor=red]; - 18 [label="Delegated constructor call: super|>()" style="filled" fillcolor=yellow]; - 19 [label="Exit function " style="filled" fillcolor=red]; + 16 [label="Enter function " style="filled" fillcolor=red]; + 17 [label="Delegated constructor call: super|>()" style="filled" fillcolor=yellow]; + 18 [label="Exit function " style="filled" fillcolor=red]; } - 20 [label="Exit class IssueListView" style="filled" fillcolor=red]; + 19 [label="Exit class IssueListView" style="filled" fillcolor=red]; } - 16 -> {17} [color=green]; - 16 -> {20} [style=dotted]; - 16 -> {17} [style=dashed]; + 15 -> {16} [color=green]; + 15 -> {19} [style=dotted]; + 15 -> {16} [style=dashed]; + 16 -> {17}; 17 -> {18}; - 18 -> {19}; - 19 -> {20} [color=green]; + 18 -> {19} [color=green]; subgraph cluster_7 { color=red - 21 [label="Enter function updateFrom" style="filled" fillcolor=red]; + 20 [label="Enter function updateFrom" style="filled" fillcolor=red]; subgraph cluster_8 { color=blue - 22 [label="Enter block"]; - 23 [label="Exit block"]; + 21 [label="Enter block"]; + 22 [label="Exit block"]; } - 24 [label="Exit function updateFrom" style="filled" fillcolor=red]; + 23 [label="Exit function updateFrom" style="filled" fillcolor=red]; } + 20 -> {21}; 21 -> {22}; 22 -> {23}; - 23 -> {24}; subgraph cluster_9 { color=red - 25 [label="Enter class IssuesListUserProfile" style="filled" fillcolor=red]; + 24 [label="Enter class IssuesListUserProfile" style="filled" fillcolor=red]; subgraph cluster_10 { color=blue - 26 [label="Enter function " style="filled" fillcolor=red]; - 27 [label="Delegated constructor call: super|>()" style="filled" fillcolor=yellow]; - 28 [label="Exit function " style="filled" fillcolor=red]; + 25 [label="Enter function " style="filled" fillcolor=red]; + 26 [label="Delegated constructor call: super|>()" style="filled" fillcolor=yellow]; + 27 [label="Exit function " style="filled" fillcolor=red]; } subgraph cluster_11 { color=blue - 29 [label="Enter property" style="filled" fillcolor=red]; + 28 [label="Enter property" style="filled" fillcolor=red]; subgraph cluster_12 { color=blue - 30 [label="Function call arguments enter"]; - 31 [label="Postponed enter to lambda"]; + 29 [label="Function call arguments enter"]; + 30 [label="Postponed enter to lambda"]; subgraph cluster_13 { color=blue - 32 [label="Enter function " style="filled" fillcolor=red]; + 31 [label="Enter function " style="filled" fillcolor=red]; subgraph cluster_14 { color=blue - 33 [label="Enter block"]; - 34 [label="Enter anonymous object"]; + 32 [label="Enter block"]; + 33 [label="Enter anonymous object"]; subgraph cluster_15 { color=blue - 35 [label="Enter class " style="filled" fillcolor=red]; + 34 [label="Enter class " style="filled" fillcolor=red]; subgraph cluster_16 { color=blue - 36 [label="Enter function " style="filled" fillcolor=red]; - 37 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 38 [label="Exit function " style="filled" fillcolor=red]; + 35 [label="Enter function " style="filled" fillcolor=red]; + 36 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 37 [label="Exit function " style="filled" fillcolor=red]; } - 39 [label="Exit class " style="filled" fillcolor=red]; + 38 [label="Exit class " style="filled" fillcolor=red]; } - 40 [label="Exit anonymous object expression"]; - 41 [label="Exit block"]; + 39 [label="Exit anonymous object expression"]; + 40 [label="Exit block"]; } - 42 [label="Exit function " style="filled" fillcolor=red]; + 41 [label="Exit function " style="filled" fillcolor=red]; } subgraph cluster_17 { color=blue - 43 [label="Enter function setValue" style="filled" fillcolor=red]; + 42 [label="Enter function setValue" style="filled" fillcolor=red]; subgraph cluster_18 { color=blue - 44 [label="Enter block"]; + 43 [label="Enter block"]; subgraph cluster_19 { color=blue - 45 [label="Function call arguments enter"]; + 44 [label="Function call arguments enter"]; subgraph cluster_20 { color=blue - 46 [label="Function call arguments enter"]; - 47 [label="Function call arguments exit"]; + 45 [label="Function call arguments enter"]; + 46 [label="Function call arguments exit"]; } - 48 [label="Function call: R|/IssueListView.IssueListView|()" style="filled" fillcolor=yellow]; - 49 [label="Access variable R|/value|"]; - 50 [label="Function call arguments exit"]; + 47 [label="Function call: R|/IssueListView.IssueListView|()" style="filled" fillcolor=yellow]; + 48 [label="Access variable R|/value|"]; + 49 [label="Function call arguments exit"]; } - 51 [label="Function call: R|/IssueListView.IssueListView|().R|/IssueListView.updateFrom|(...)" style="filled" fillcolor=yellow]; - 52 [label="Jump: ^setValue R|/IssueListView.IssueListView|().R|/IssueListView.updateFrom|(R|/value|)"]; - 53 [label="Stub" style="filled" fillcolor=gray]; - 54 [label="Exit block" style="filled" fillcolor=gray]; + 50 [label="Function call: R|/IssueListView.IssueListView|().R|/IssueListView.updateFrom|(...)" style="filled" fillcolor=yellow]; + 51 [label="Jump: ^setValue R|/IssueListView.IssueListView|().R|/IssueListView.updateFrom|(R|/value|)"]; + 52 [label="Stub" style="filled" fillcolor=gray]; + 53 [label="Exit block" style="filled" fillcolor=gray]; } - 55 [label="Exit function setValue" style="filled" fillcolor=red]; + 54 [label="Exit function setValue" style="filled" fillcolor=red]; } subgraph cluster_21 { color=blue - 56 [label="Enter function getValue" style="filled" fillcolor=red]; + 55 [label="Enter function getValue" style="filled" fillcolor=red]; subgraph cluster_22 { color=blue - 57 [label="Enter block"]; + 56 [label="Enter block"]; subgraph cluster_23 { color=blue - 58 [label="Function call arguments enter"]; - 59 [label="Function call arguments exit"]; + 57 [label="Function call arguments enter"]; + 58 [label="Function call arguments exit"]; } - 60 [label="Function call: R|/IssueListView.IssueListView|()" style="filled" fillcolor=yellow]; - 61 [label="Jump: ^getValue R|/IssueListView.IssueListView|()"]; - 62 [label="Stub" style="filled" fillcolor=gray]; - 63 [label="Exit block" style="filled" fillcolor=gray]; + 59 [label="Function call: R|/IssueListView.IssueListView|()" style="filled" fillcolor=yellow]; + 60 [label="Jump: ^getValue R|/IssueListView.IssueListView|()"]; + 61 [label="Stub" style="filled" fillcolor=gray]; + 62 [label="Exit block" style="filled" fillcolor=gray]; } - 64 [label="Exit function getValue" style="filled" fillcolor=red]; + 63 [label="Exit function getValue" style="filled" fillcolor=red]; } - 65 [label="Function call arguments exit"]; + 64 [label="Function call arguments exit"]; } - 66 [label="Postponed exit from lambda"]; - 67 [label="Function call: this@R|/IssuesListUserProfile|.R|/delegate|(...)" style="filled" fillcolor=yellow]; + 65 [label="Postponed exit from lambda"]; + 66 [label="Function call: this@R|/IssuesListUserProfile|.R|/delegate|(...)" style="filled" fillcolor=yellow]; subgraph cluster_24 { color=blue - 68 [label="Function call arguments enter"]; - 69 [label="Function call arguments exit"]; + 67 [label="Function call arguments enter"]; + 68 [label="Function call arguments exit"]; } - 70 [label="Function call: this@R|/IssuesListUserProfile|.R|/delegate|(...).R?C|special/error|(...)" style="filled" fillcolor=yellow]; - 71 [label="Exit property delegate" style="filled" fillcolor=yellow]; - 72 [label="Exit property" style="filled" fillcolor=red]; + 69 [label="Function call: this@R|/IssuesListUserProfile|.R|/delegate|(...).R?C|special/error|(...)" style="filled" fillcolor=yellow]; + 70 [label="Exit property delegate" style="filled" fillcolor=yellow]; + 71 [label="Exit property" style="filled" fillcolor=red]; } - 73 [label="Exit class IssuesListUserProfile" style="filled" fillcolor=red]; + 72 [label="Exit class IssuesListUserProfile" style="filled" fillcolor=red]; } - 25 -> {26} [color=green]; - 25 -> {73} [style=dotted]; - 25 -> {26 29} [style=dashed]; + 24 -> {25} [color=green]; + 24 -> {72} [style=dotted]; + 24 -> {25 28} [style=dashed]; + 25 -> {26}; 26 -> {27}; - 27 -> {28}; - 28 -> {29} [color=green]; + 27 -> {28} [color=green]; + 28 -> {29}; 29 -> {30}; - 30 -> {31}; - 31 -> {32 65 66}; - 31 -> {32} [style=dashed]; + 30 -> {31 64 65}; + 30 -> {31} [style=dashed]; + 31 -> {32}; 32 -> {33}; 33 -> {34}; + 33 -> {39} [style=dotted]; + 33 -> {34} [style=dashed]; 34 -> {35}; - 34 -> {40} [style=dotted]; + 34 -> {42 55} [color=red]; + 34 -> {38} [style=dotted]; 34 -> {35} [style=dashed]; 35 -> {36}; - 35 -> {43 56} [color=red]; - 35 -> {39} [style=dotted]; - 35 -> {36} [style=dashed]; 36 -> {37}; 37 -> {38}; 38 -> {39}; + 38 -> {42 55} [color=green]; + 38 -> {42 55} [style=dashed]; 39 -> {40}; - 39 -> {43 56} [color=green]; - 39 -> {43 56} [style=dashed]; 40 -> {41}; - 41 -> {42}; + 42 -> {43}; 43 -> {44}; 44 -> {45}; 45 -> {46}; @@ -216,90 +216,89 @@ digraph delegateWithAnonymousObject_kt { 48 -> {49}; 49 -> {50}; 50 -> {51}; - 51 -> {52}; - 52 -> {55}; + 51 -> {54}; + 51 -> {52} [style=dotted]; 52 -> {53} [style=dotted]; 53 -> {54} [style=dotted]; - 54 -> {55} [style=dotted]; + 55 -> {56}; 56 -> {57}; 57 -> {58}; 58 -> {59}; 59 -> {60}; - 60 -> {61}; - 61 -> {64}; + 60 -> {63}; + 60 -> {61} [style=dotted]; 61 -> {62} [style=dotted]; 62 -> {63} [style=dotted]; - 63 -> {64} [style=dotted]; - 65 -> {67}; - 66 -> {67} [color=green]; - 66 -> {71} [color=red label="Postponed"]; + 64 -> {66}; + 65 -> {66} [color=green]; + 65 -> {70} [color=red label="Postponed"]; + 66 -> {67}; 67 -> {68}; 68 -> {69}; 69 -> {70}; 70 -> {71}; - 71 -> {72}; - 72 -> {73} [color=green]; + 71 -> {72} [color=green]; subgraph cluster_25 { color=red - 74 [label="Enter function " style="filled" fillcolor=red]; + 73 [label="Enter function " style="filled" fillcolor=red]; subgraph cluster_26 { color=blue - 75 [label="Enter block"]; + 74 [label="Enter block"]; subgraph cluster_27 { color=blue - 76 [label="Function call arguments enter"]; - 77 [label="Access variable D|/IssuesListUserProfile.issueListView|"]; - 78 [label="Function call arguments exit"]; + 75 [label="Function call arguments enter"]; + 76 [label="Access variable D|/IssuesListUserProfile.issueListView|"]; + 77 [label="Function call arguments exit"]; } - 79 [label="Function call: this@R|/IssuesListUserProfile|.D|/IssuesListUserProfile.issueListView|.R|SubstitutionOverride|(...)" style="filled" fillcolor=yellow]; - 80 [label="Jump: ^ this@R|/IssuesListUserProfile|.D|/IssuesListUserProfile.issueListView|.R|SubstitutionOverride|(this@R|/IssuesListUserProfile|, ::R|/IssuesListUserProfile.issueListView|)"]; - 81 [label="Stub" style="filled" fillcolor=gray]; - 82 [label="Exit block" style="filled" fillcolor=gray]; + 78 [label="Function call: this@R|/IssuesListUserProfile|.D|/IssuesListUserProfile.issueListView|.R|SubstitutionOverride|(...)" style="filled" fillcolor=yellow]; + 79 [label="Jump: ^ this@R|/IssuesListUserProfile|.D|/IssuesListUserProfile.issueListView|.R|SubstitutionOverride|(this@R|/IssuesListUserProfile|, ::R|/IssuesListUserProfile.issueListView|)"]; + 80 [label="Stub" style="filled" fillcolor=gray]; + 81 [label="Exit block" style="filled" fillcolor=gray]; } - 83 [label="Exit function " style="filled" fillcolor=red]; + 82 [label="Exit function " style="filled" fillcolor=red]; } + 73 -> {74}; 74 -> {75}; 75 -> {76}; 76 -> {77}; 77 -> {78}; 78 -> {79}; - 79 -> {80}; - 80 -> {83}; + 79 -> {82}; + 79 -> {80} [style=dotted]; 80 -> {81} [style=dotted]; 81 -> {82} [style=dotted]; - 82 -> {83} [style=dotted]; subgraph cluster_28 { color=red - 84 [label="Enter function " style="filled" fillcolor=red]; + 83 [label="Enter function " style="filled" fillcolor=red]; subgraph cluster_29 { color=blue - 85 [label="Enter block"]; + 84 [label="Enter block"]; subgraph cluster_30 { color=blue - 86 [label="Function call arguments enter"]; - 87 [label="Access variable D|/IssuesListUserProfile.issueListView|"]; - 88 [label="Access variable R|/issueListView|"]; - 89 [label="Function call arguments exit"]; + 85 [label="Function call arguments enter"]; + 86 [label="Access variable D|/IssuesListUserProfile.issueListView|"]; + 87 [label="Access variable R|/issueListView|"]; + 88 [label="Function call arguments exit"]; } - 90 [label="Function call: this@R|/IssuesListUserProfile|.D|/IssuesListUserProfile.issueListView|.R|SubstitutionOverride|(...)" style="filled" fillcolor=yellow]; - 91 [label="Jump: ^ this@R|/IssuesListUserProfile|.D|/IssuesListUserProfile.issueListView|.R|SubstitutionOverride|(this@R|/IssuesListUserProfile|, ::R|/IssuesListUserProfile.issueListView|, R|/issueListView|)"]; - 92 [label="Stub" style="filled" fillcolor=gray]; - 93 [label="Exit block" style="filled" fillcolor=gray]; + 89 [label="Function call: this@R|/IssuesListUserProfile|.D|/IssuesListUserProfile.issueListView|.R|SubstitutionOverride|(...)" style="filled" fillcolor=yellow]; + 90 [label="Jump: ^ this@R|/IssuesListUserProfile|.D|/IssuesListUserProfile.issueListView|.R|SubstitutionOverride|(this@R|/IssuesListUserProfile|, ::R|/IssuesListUserProfile.issueListView|, R|/issueListView|)"]; + 91 [label="Stub" style="filled" fillcolor=gray]; + 92 [label="Exit block" style="filled" fillcolor=gray]; } - 94 [label="Exit function " style="filled" fillcolor=red]; + 93 [label="Exit function " style="filled" fillcolor=red]; } + 83 -> {84}; 84 -> {85}; 85 -> {86}; 86 -> {87}; 87 -> {88}; 88 -> {89}; 89 -> {90}; - 90 -> {91}; - 91 -> {94}; + 90 -> {93}; + 90 -> {91} [style=dotted]; 91 -> {92} [style=dotted]; 92 -> {93} [style=dotted]; - 93 -> {94} [style=dotted]; } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/inference/plusAssignWithLambdaInRhs.dot b/compiler/fir/analysis-tests/testData/resolveWithStdlib/inference/plusAssignWithLambdaInRhs.dot index ed73246872a..90e470b4d44 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/inference/plusAssignWithLambdaInRhs.dot +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/inference/plusAssignWithLambdaInRhs.dot @@ -18,154 +18,153 @@ digraph plusAssignWithLambdaInRhs_kt { 3 [label="Enter block"]; 4 [label="Const: Null(null)"]; 5 [label="Check not null: Null(null)!!" style="filled" fillcolor=yellow]; - 6 [label="Stub" style="filled" fillcolor=gray]; - 7 [label="Variable declaration: lval list: R|kotlin/collections/MutableList>|" style="filled" fillcolor=gray]; - 8 [label="Access variable R|/list|" style="filled" fillcolor=gray]; - 9 [label="Postponed enter to lambda" style="filled" fillcolor=gray]; + 6 [label="Variable declaration: lval list: R|kotlin/collections/MutableList>|"]; + 7 [label="Access variable R|/list|"]; + 8 [label="Postponed enter to lambda"]; subgraph cluster_3 { color=blue - 10 [label="Enter function " style="filled" fillcolor=gray]; + 9 [label="Enter function " style="filled" fillcolor=red]; subgraph cluster_4 { color=blue - 11 [label="Enter block" style="filled" fillcolor=gray]; - 12 [label="Access variable R|/it|" style="filled" fillcolor=gray]; - 13 [label="Exit block" style="filled" fillcolor=gray]; + 10 [label="Enter block"]; + 11 [label="Access variable R|/it|"]; + 12 [label="Exit block"]; } - 14 [label="Exit function " style="filled" fillcolor=gray]; + 13 [label="Exit function " style="filled" fillcolor=red]; } - 15 [label="Postponed exit from lambda" style="filled" fillcolor=gray]; - 16 [label="Function call: R|/list|.R|kotlin/collections/plusAssign| kotlin/String|>(...)" style="filled" fillcolor=gray]; - 17 [label="Exit block" style="filled" fillcolor=gray]; + 14 [label="Postponed exit from lambda"]; + 15 [label="Function call: R|/list|.R|kotlin/collections/plusAssign| kotlin/String|>(...)" style="filled" fillcolor=yellow]; + 16 [label="Exit block"]; } - 18 [label="Exit function test" style="filled" fillcolor=gray]; + 17 [label="Exit function test" style="filled" fillcolor=red]; } 2 -> {3}; 3 -> {4}; 4 -> {5}; - 5 -> {6} [style=dotted]; - 6 -> {7} [style=dotted]; - 7 -> {8} [style=dotted]; - 8 -> {9} [style=dotted]; - 9 -> {10 15 16} [style=dotted]; - 9 -> {10} [style=dashed]; - 10 -> {11} [style=dotted]; - 11 -> {12} [style=dotted]; - 12 -> {13} [style=dotted]; - 13 -> {14} [style=dotted]; - 15 -> {16} [style=dotted label="Postponed"]; - 16 -> {17} [style=dotted]; - 17 -> {18} [style=dotted]; + 5 -> {6}; + 6 -> {7}; + 7 -> {8}; + 8 -> {9 14 15}; + 8 -> {9} [style=dashed]; + 9 -> {10}; + 10 -> {11}; + 11 -> {12}; + 12 -> {13}; + 14 -> {15} [label="Postponed"]; + 15 -> {16}; + 16 -> {17}; subgraph cluster_5 { color=red - 19 [label="Enter class A" style="filled" fillcolor=red]; + 18 [label="Enter class A" style="filled" fillcolor=red]; subgraph cluster_6 { color=blue - 20 [label="Enter function " style="filled" fillcolor=red]; - 21 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 22 [label="Exit function " style="filled" fillcolor=red]; + 19 [label="Enter function " style="filled" fillcolor=red]; + 20 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 21 [label="Exit function " style="filled" fillcolor=red]; } subgraph cluster_7 { color=blue - 23 [label="Enter property" style="filled" fillcolor=red]; - 24 [label="Access variable R|/executor|"]; - 25 [label="Exit property" style="filled" fillcolor=red]; + 22 [label="Enter property" style="filled" fillcolor=red]; + 23 [label="Access variable R|/executor|"]; + 24 [label="Exit property" style="filled" fillcolor=red]; } - 26 [label="Exit class A" style="filled" fillcolor=red]; + 25 [label="Exit class A" style="filled" fillcolor=red]; } - 19 -> {20} [color=green]; - 19 -> {26} [style=dotted]; - 19 -> {20 23} [style=dashed]; + 18 -> {19} [color=green]; + 18 -> {25} [style=dotted]; + 18 -> {19 22} [style=dashed]; + 19 -> {20}; 20 -> {21}; - 21 -> {22}; - 22 -> {23} [color=green]; + 21 -> {22} [color=green]; + 22 -> {23}; 23 -> {24}; - 24 -> {25}; - 25 -> {26} [color=green]; + 24 -> {25} [color=green]; subgraph cluster_8 { color=red - 27 [label="Enter function postpone" style="filled" fillcolor=red]; + 26 [label="Enter function postpone" style="filled" fillcolor=red]; subgraph cluster_9 { color=blue - 28 [label="Enter block"]; + 27 [label="Enter block"]; subgraph cluster_10 { color=blue - 29 [label="Function call arguments enter"]; - 30 [label="Function call arguments exit"]; + 28 [label="Function call arguments enter"]; + 29 [label="Function call arguments exit"]; } - 31 [label="Function call: R|kotlin/collections/mutableListOf| kotlin/Unit|>()" style="filled" fillcolor=yellow]; - 32 [label="Variable declaration: lval queue: R|kotlin/collections/MutableList>|"]; + 30 [label="Function call: R|kotlin/collections/mutableListOf| kotlin/Unit|>()" style="filled" fillcolor=yellow]; + 31 [label="Variable declaration: lval queue: R|kotlin/collections/MutableList>|"]; subgraph cluster_11 { color=blue - 33 [label="Function call arguments enter"]; - 34 [label="Postponed enter to lambda"]; + 32 [label="Function call arguments enter"]; + 33 [label="Postponed enter to lambda"]; subgraph cluster_12 { color=blue - 35 [label="Enter function " style="filled" fillcolor=red]; + 34 [label="Enter function " style="filled" fillcolor=red]; subgraph cluster_13 { color=blue - 36 [label="Enter block"]; - 37 [label="Access variable R|/queue|"]; - 38 [label="Postponed enter to lambda"]; + 35 [label="Enter block"]; + 36 [label="Access variable R|/queue|"]; + 37 [label="Postponed enter to lambda"]; subgraph cluster_14 { color=blue - 39 [label="Enter function " style="filled" fillcolor=red]; + 38 [label="Enter function " style="filled" fillcolor=red]; subgraph cluster_15 { color=blue - 40 [label="Enter block"]; + 39 [label="Enter block"]; subgraph cluster_16 { color=blue - 41 [label="Function call arguments enter"]; + 40 [label="Function call arguments enter"]; subgraph cluster_17 { color=blue - 42 [label="Function call arguments enter"]; - 43 [label="Function call arguments exit"]; + 41 [label="Function call arguments enter"]; + 42 [label="Function call arguments exit"]; } - 44 [label="Function call: R|/computation|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 45 [label="Function call arguments exit"]; + 43 [label="Function call: R|/computation|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 44 [label="Function call arguments exit"]; } - 46 [label="Function call: R|/resolve|.R|SubstitutionOverride|(...)" style="filled" fillcolor=yellow]; - 47 [label="Exit block"]; + 45 [label="Function call: R|/resolve|.R|SubstitutionOverride|(...)" style="filled" fillcolor=yellow]; + 46 [label="Exit block"]; } - 48 [label="Exit function " style="filled" fillcolor=red]; + 47 [label="Exit function " style="filled" fillcolor=red]; } - 49 [label="Postponed exit from lambda"]; - 50 [label="Function call: R|/queue|.R|kotlin/collections/plusAssign| kotlin/Unit|>(...)" style="filled" fillcolor=yellow]; - 51 [label="Exit block"]; + 48 [label="Postponed exit from lambda"]; + 49 [label="Function call: R|/queue|.R|kotlin/collections/plusAssign| kotlin/Unit|>(...)" style="filled" fillcolor=yellow]; + 50 [label="Exit block"]; } - 52 [label="Exit function " style="filled" fillcolor=red]; + 51 [label="Exit function " style="filled" fillcolor=red]; } - 53 [label="Function call arguments exit"]; + 52 [label="Function call arguments exit"]; } - 54 [label="Postponed exit from lambda"]; - 55 [label="Function call: R|/A.A|(...)" style="filled" fillcolor=yellow]; - 56 [label="Jump: ^postpone R|/A.A|( = A@fun (resolve: R|(T) -> kotlin/Unit|): R|kotlin/Unit| { + 53 [label="Postponed exit from lambda"]; + 54 [label="Function call: R|/A.A|(...)" style="filled" fillcolor=yellow]; + 55 [label="Jump: ^postpone R|/A.A|( = A@fun (resolve: R|(T) -> kotlin/Unit|): R|kotlin/Unit| { R|/queue|.R|kotlin/collections/plusAssign| kotlin/Unit|>(fun (): R|kotlin/Unit| { R|/resolve|.R|SubstitutionOverride|(R|/computation|.R|SubstitutionOverride|()) } ) } )"]; - 57 [label="Stub" style="filled" fillcolor=gray]; - 58 [label="Exit block" style="filled" fillcolor=gray]; + 56 [label="Stub" style="filled" fillcolor=gray]; + 57 [label="Exit block" style="filled" fillcolor=gray]; } - 59 [label="Exit function postpone" style="filled" fillcolor=red]; + 58 [label="Exit function postpone" style="filled" fillcolor=red]; } + 26 -> {27}; 27 -> {28}; 28 -> {29}; 29 -> {30}; 30 -> {31}; 31 -> {32}; 32 -> {33}; - 33 -> {34}; - 34 -> {35 53 54}; - 34 -> {35} [style=dashed]; + 33 -> {34 52 53}; + 33 -> {34} [style=dashed]; + 34 -> {35}; 35 -> {36}; 36 -> {37}; - 37 -> {38}; - 38 -> {39 49 50}; - 38 -> {39} [style=dashed]; + 37 -> {38 48 49}; + 37 -> {38} [style=dashed]; + 38 -> {39}; 39 -> {40}; 40 -> {41}; 41 -> {42}; @@ -174,16 +173,15 @@ digraph plusAssignWithLambdaInRhs_kt { 44 -> {45}; 45 -> {46}; 46 -> {47}; - 47 -> {48}; - 49 -> {50} [label="Postponed"]; + 48 -> {49} [label="Postponed"]; + 49 -> {50}; 50 -> {51}; - 51 -> {52}; - 53 -> {55}; - 54 -> {55} [label="Postponed"]; - 55 -> {56}; - 56 -> {59}; + 52 -> {54}; + 53 -> {54} [label="Postponed"]; + 54 -> {55}; + 55 -> {58}; + 55 -> {56} [style=dotted]; 56 -> {57} [style=dotted]; 57 -> {58} [style=dotted]; - 58 -> {59} [style=dotted]; } diff --git a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirLightTreeOldFrontendDiagnosticsTestGenerated.java b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirLightTreeOldFrontendDiagnosticsTestGenerated.java index 36d7a15308a..4318c034700 100644 --- a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirLightTreeOldFrontendDiagnosticsTestGenerated.java +++ b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirLightTreeOldFrontendDiagnosticsTestGenerated.java @@ -16646,6 +16646,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir runTest("compiler/testData/diagnostics/tests/inference/capturedTypesInSelfType.kt"); } + @Test + @TestMetadata("checkNotNullWithNullableExpectedType.kt") + public void testCheckNotNullWithNullableExpectedType() { + runTest("compiler/testData/diagnostics/tests/inference/checkNotNullWithNullableExpectedType.kt"); + } + @Test @TestMetadata("coerceFunctionLiteralToSuspend.kt") public void testCoerceFunctionLiteralToSuspend() { @@ -17168,6 +17174,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir runTest("compiler/testData/diagnostics/tests/inference/mostSpecificAfterInference.kt"); } + @Test + @TestMetadata("nestedIfWithExpectedType.kt") + public void testNestedIfWithExpectedType() { + runTest("compiler/testData/diagnostics/tests/inference/nestedIfWithExpectedType.kt"); + } + @Test @TestMetadata("NoInferenceFromDeclaredBounds.kt") public void testNoInferenceFromDeclaredBounds() { @@ -18976,6 +18988,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir public void testWrongApproximationWithDefNotNullTypesAndDelegates() { runTest("compiler/testData/diagnostics/tests/inference/constraints/wrongApproximationWithDefNotNullTypesAndDelegates.kt"); } + + @Test + @TestMetadata("wrongExpectedTypeForWhen.kt") + public void testWrongExpectedTypeForWhen() { + runTest("compiler/testData/diagnostics/tests/inference/constraints/wrongExpectedTypeForWhen.kt"); + } } @Nested diff --git a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirPsiOldFrontendDiagnosticsTestGenerated.java b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirPsiOldFrontendDiagnosticsTestGenerated.java index 663f228adf4..3fa6b6d2d23 100644 --- a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirPsiOldFrontendDiagnosticsTestGenerated.java +++ b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirPsiOldFrontendDiagnosticsTestGenerated.java @@ -16652,6 +16652,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia runTest("compiler/testData/diagnostics/tests/inference/capturedTypesInSelfType.kt"); } + @Test + @TestMetadata("checkNotNullWithNullableExpectedType.kt") + public void testCheckNotNullWithNullableExpectedType() { + runTest("compiler/testData/diagnostics/tests/inference/checkNotNullWithNullableExpectedType.kt"); + } + @Test @TestMetadata("coerceFunctionLiteralToSuspend.kt") public void testCoerceFunctionLiteralToSuspend() { @@ -17174,6 +17180,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia runTest("compiler/testData/diagnostics/tests/inference/mostSpecificAfterInference.kt"); } + @Test + @TestMetadata("nestedIfWithExpectedType.kt") + public void testNestedIfWithExpectedType() { + runTest("compiler/testData/diagnostics/tests/inference/nestedIfWithExpectedType.kt"); + } + @Test @TestMetadata("NoInferenceFromDeclaredBounds.kt") public void testNoInferenceFromDeclaredBounds() { @@ -18982,6 +18994,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia public void testWrongApproximationWithDefNotNullTypesAndDelegates() { runTest("compiler/testData/diagnostics/tests/inference/constraints/wrongApproximationWithDefNotNullTypesAndDelegates.kt"); } + + @Test + @TestMetadata("wrongExpectedTypeForWhen.kt") + public void testWrongExpectedTypeForWhen() { + runTest("compiler/testData/diagnostics/tests/inference/constraints/wrongExpectedTypeForWhen.kt"); + } } @Nested diff --git a/compiler/fir/cones/src/org/jetbrains/kotlin/fir/types/ConeBuiltinTypeUtils.kt b/compiler/fir/cones/src/org/jetbrains/kotlin/fir/types/ConeBuiltinTypeUtils.kt index 198b5f37b8e..ad1b380e995 100644 --- a/compiler/fir/cones/src/org/jetbrains/kotlin/fir/types/ConeBuiltinTypeUtils.kt +++ b/compiler/fir/cones/src/org/jetbrains/kotlin/fir/types/ConeBuiltinTypeUtils.kt @@ -17,11 +17,13 @@ val ConeKotlinType.isDouble: Boolean get() = isBuiltinType(StandardClassIds.Doub val ConeKotlinType.isAny: Boolean get() = isBuiltinType(StandardClassIds.Any, false) val ConeKotlinType.isNullableAny: Boolean get() = isBuiltinType(StandardClassIds.Any, true) +val ConeKotlinType.isAnyOrNullableAny: Boolean get() = isBuiltinType(StandardClassIds.Any, null) val ConeKotlinType.isNothing: Boolean get() = isBuiltinType(StandardClassIds.Nothing, false) val ConeKotlinType.isNullableNothing: Boolean get() = isBuiltinType(StandardClassIds.Nothing, true) val ConeKotlinType.isNothingOrNullableNothing: Boolean get() = isBuiltinType(StandardClassIds.Nothing, null) val ConeKotlinType.isUnit: Boolean get() = isBuiltinType(StandardClassIds.Unit, false) +val ConeKotlinType.isUnitOrNullableUnit: Boolean get() = isBuiltinType(StandardClassIds.Unit, null) val ConeKotlinType.isBoolean: Boolean get() = isBuiltinType(StandardClassIds.Boolean, false) val ConeKotlinType.isNullableBoolean: Boolean get() = isBuiltinType(StandardClassIds.Boolean, true) val ConeKotlinType.isBooleanOrNullableBoolean: Boolean get() = isBuiltinType(StandardClassIds.Boolean, null) diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java index e975e87dde3..1a6e82b702f 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java @@ -23817,6 +23817,12 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr runTest("compiler/testData/codegen/box/inference/kt51040.kt"); } + @Test + @TestMetadata("kt65882.kt") + public void testKt65882() { + runTest("compiler/testData/codegen/box/inference/kt65882.kt"); + } + @Test @TestMetadata("lambdaWithStarReturn.kt") public void testLambdaWithStarReturn() { diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenWithFir2IrFakeOverrideGeneratorTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenWithFir2IrFakeOverrideGeneratorTestGenerated.java index a8e44af3b2d..0ea43b9abaf 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenWithFir2IrFakeOverrideGeneratorTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenWithFir2IrFakeOverrideGeneratorTestGenerated.java @@ -23817,6 +23817,12 @@ public class FirLightTreeBlackBoxCodegenWithFir2IrFakeOverrideGeneratorTestGener runTest("compiler/testData/codegen/box/inference/kt51040.kt"); } + @Test + @TestMetadata("kt65882.kt") + public void testKt65882() { + runTest("compiler/testData/codegen/box/inference/kt65882.kt"); + } + @Test @TestMetadata("lambdaWithStarReturn.kt") public void testLambdaWithStarReturn() { diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java index a349257320a..1321bea286b 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java @@ -23817,6 +23817,12 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo runTest("compiler/testData/codegen/box/inference/kt51040.kt"); } + @Test + @TestMetadata("kt65882.kt") + public void testKt65882() { + runTest("compiler/testData/codegen/box/inference/kt65882.kt"); + } + @Test @TestMetadata("lambdaWithStarReturn.kt") public void testLambdaWithStarReturn() { diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/inference/FirCallCompleter.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/inference/FirCallCompleter.kt index 765fb117a23..24a492a865e 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/inference/FirCallCompleter.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/inference/FirCallCompleter.kt @@ -20,6 +20,7 @@ import org.jetbrains.kotlin.fir.diagnostics.ConeCannotInferValueParameterType import org.jetbrains.kotlin.fir.expressions.* import org.jetbrains.kotlin.fir.resolve.ResolutionMode import org.jetbrains.kotlin.fir.resolve.calls.* +import org.jetbrains.kotlin.fir.resolve.fullyExpandedType import org.jetbrains.kotlin.fir.resolve.inference.model.ConeArgumentConstraintPosition import org.jetbrains.kotlin.fir.resolve.inference.model.ConeExpectedTypeConstraintPosition import org.jetbrains.kotlin.fir.resolve.initialTypeOfCandidate @@ -30,6 +31,9 @@ import org.jetbrains.kotlin.fir.resolve.transformers.body.resolve.FirAbstractBod import org.jetbrains.kotlin.fir.resolve.transformers.body.resolve.resultType import org.jetbrains.kotlin.fir.resolve.transformers.replaceLambdaArgumentInvocationKinds import org.jetbrains.kotlin.fir.resolve.typeFromCallee +import org.jetbrains.kotlin.fir.symbols.FirBasedSymbol +import org.jetbrains.kotlin.fir.symbols.SyntheticCallableId +import org.jetbrains.kotlin.fir.symbols.impl.FirCallableSymbol import org.jetbrains.kotlin.fir.symbols.impl.FirValueParameterSymbol import org.jetbrains.kotlin.fir.types.* import org.jetbrains.kotlin.fir.types.builder.buildErrorTypeRef @@ -133,10 +137,17 @@ class FirCallCompleter( resolutionMode: ResolutionMode, ) { if (resolutionMode !is ResolutionMode.WithExpectedType) return - val expectedType = resolutionMode.expectedTypeRef.coneTypeSafe() ?: return + val expectedType = resolutionMode.expectedTypeRef.type.fullyExpandedType(session) val system = candidate.system when { + // Only add equality constraint in independent contexts (resolutionMode.forceFullCompletion) for K1 compatibility. + // Otherwise, + // we miss some constraints from incorporation which leads to NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER in cases like + // compiler/testData/diagnostics/tests/inference/nestedIfWithExpectedType.kt. + resolutionMode.forceFullCompletion && candidate.isSyntheticFunctionCallThatShouldUseEqualityConstraint(expectedType) -> + system.addEqualityConstraintIfCompatible(initialType, expectedType, ConeExpectedTypeConstraintPosition) + // If type mismatch is assumed to be reported in the checker, we should not add a subtyping constraint that leads to error. // Because it might make resulting type correct while, it's hopefully would be more clear if we let the call be inferred without // the expected type, and then would report diagnostic in the checker. @@ -167,6 +178,44 @@ class FirCallCompleter( } } + /** + * For synthetic functions (when, try, !!, but **not** elvis), we need to add an equality constraint for the expected type + * so that some type variables aren't inferred to `Nothing` that appears in one of the branches. + * + * @See org.jetbrains.kotlin.types.expressions.ControlStructureTypingUtils.createKnownTypeParameterSubstitutorForSpecialCall + */ + private fun Candidate.isSyntheticFunctionCallThatShouldUseEqualityConstraint(expectedType: ConeKotlinType): Boolean { + // If we're inside an assignment's RHS, we mustn't add an equality constraint because it might prevent smartcasts. + // Example: val x: String? = null; x = if (foo) "" else throw Exception() + if (components.context.isInsideAssignmentRhs) return false + + val symbol = symbol as? FirCallableSymbol ?: return false + if (symbol.origin != FirDeclarationOrigin.Synthetic.FakeFunction || + expectedType.isUnitOrNullableUnit || + expectedType.isAnyOrNullableAny || + // We don't want to add an equality constraint to a nullable type to a !! call. + // See compiler/testData/diagnostics/tests/inference/checkNotNullWithNullableExpectedType.kt + (symbol.callableId == SyntheticCallableId.CHECK_NOT_NULL && expectedType.canBeNull(session)) + ) { + return false + } + + // If our expression contains any elvis, even nested, we mustn't add an equality constraint because it might influence the + // inferred type of the elvis RHS. + if (system.allTypeVariables.values.any { + it is ConeTypeParameterBasedTypeVariable && it.typeParameterSymbol.containingDeclarationSymbol.isSyntheticElvisFunction() + } + ) { + return false + } + + return true + } + + private fun FirBasedSymbol<*>.isSyntheticElvisFunction(): Boolean { + return origin == FirDeclarationOrigin.Synthetic.FakeFunction && (this as? FirCallableSymbol)?.callableId == SyntheticCallableId.ELVIS_NOT_NULL + } + fun runCompletionForCall( candidate: Candidate, completionMode: ConstraintSystemCompletionMode, diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirCallCompletionResultsWriterTransformer.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirCallCompletionResultsWriterTransformer.kt index b2d64e70936..1743fa3dd9c 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirCallCompletionResultsWriterTransformer.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirCallCompletionResultsWriterTransformer.kt @@ -18,6 +18,7 @@ import org.jetbrains.kotlin.fir.diagnostics.DiagnosticKind import org.jetbrains.kotlin.fir.expressions.* import org.jetbrains.kotlin.fir.expressions.builder.buildSamConversionExpression import org.jetbrains.kotlin.fir.references.FirNamedReference +import org.jetbrains.kotlin.fir.references.FirResolvedErrorReference import org.jetbrains.kotlin.fir.references.builder.buildResolvedCallableReference import org.jetbrains.kotlin.fir.references.builder.buildResolvedNamedReference import org.jetbrains.kotlin.fir.resolve.* @@ -936,9 +937,25 @@ class FirCallCompletionResultsWriterTransformer( runPCLARelatedTasksForCandidate(calleeReference.candidate) - return syntheticCall.apply { - replaceCalleeReference(calleeReference.toResolvedReference()) + val resolvedCalleeReference = calleeReference.toResolvedReference() + + // If we have a conflict between the expected type and the inferred type, we would like to set the inferred type on the expression, + // so that we report INITIALIZER_TYPE_MISMATCH/RETURN_TYPE_MISMATCH. + // This is required so that the IDE provides the correct quick fixes. + if (syntheticCall.resultType !is ConeErrorType && resolvedCalleeReference is FirResolvedErrorReference) { + val diagnostic = resolvedCalleeReference.diagnostic + if (diagnostic is ConeConstraintSystemHasContradiction) { + val candidate = diagnostic.candidate as Candidate + val newSyntheticCallType = session.typeContext.commonSuperTypeOrNull(candidate.argumentMapping!!.keys.map { it.resolvedType }) + if (newSyntheticCallType != null && !newSyntheticCallType.hasError()) { + syntheticCall.replaceConeTypeOrNull(newSyntheticCallType) + } + } } + + syntheticCall.replaceCalleeReference(resolvedCalleeReference) + + return syntheticCall } private inline fun transformSyntheticCallChildren( diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/BodyResolveContext.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/BodyResolveContext.kt index 7df3fedd80f..5a436bf166a 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/BodyResolveContext.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/BodyResolveContext.kt @@ -87,6 +87,20 @@ class BodyResolveContext( @set:PrivateForInline var inferenceSession: FirInferenceSession = FirInferenceSession.DEFAULT + @set:PrivateForInline + var isInsideAssignmentRhs: Boolean = false + + @OptIn(PrivateForInline::class) + inline fun withAssignmentRhs(block: () -> R): R { + val oldMode = this.isInsideAssignmentRhs + this.isInsideAssignmentRhs = true + return try { + block() + } finally { + this.isInsideAssignmentRhs = oldMode + } + } + /** * This is required to avoid changing current mode into [FirTowerDataMode.CLASS_HEADER_ANNOTATIONS]. * E.g., we can visit the same annotation in two ways – during a class visiting and outside of this class diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirExpressionsResolveTransformer.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirExpressionsResolveTransformer.kt index c4e4618574c..15078ae69b0 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirExpressionsResolveTransformer.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirExpressionsResolveTransformer.kt @@ -1056,13 +1056,15 @@ open class FirExpressionsResolveTransformer(transformer: FirAbstractBodyResolveT } } - val result = variableAssignment.transformRValue( - transformer, - withExpectedType( - variableAssignment.lValue.resolvedType.toFirResolvedTypeRef(), - expectedTypeMismatchIsReportedInChecker = true - ), - ) + val result = context.withAssignmentRhs { + variableAssignment.transformRValue( + transformer, + withExpectedType( + variableAssignment.lValue.resolvedType.toFirResolvedTypeRef(), + expectedTypeMismatchIsReportedInChecker = true, + ), + ) + } // for cases like // buildSomething { tVar = "" // Should infer TV from String assignment } diff --git a/compiler/testData/codegen/box/inference/kt65882.kt b/compiler/testData/codegen/box/inference/kt65882.kt new file mode 100644 index 00000000000..e88ca1d2805 --- /dev/null +++ b/compiler/testData/codegen/box/inference/kt65882.kt @@ -0,0 +1,13 @@ +fun Any?.unsafeCast(): T = this as T + +fun foo(returnType: String): R { + return when { + returnType == "Nothing" -> throw Exception() + else -> null.unsafeCast() + } +} + +fun box(): String { + foo("") + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/inference/noNothingValueInsideSpecialCall.kt b/compiler/testData/codegen/box/inference/noNothingValueInsideSpecialCall.kt index 7ac43126db1..2d78860e4f5 100644 --- a/compiler/testData/codegen/box/inference/noNothingValueInsideSpecialCall.kt +++ b/compiler/testData/codegen/box/inference/noNothingValueInsideSpecialCall.kt @@ -1,7 +1,5 @@ // WITH_REFLECT // TARGET_BACKEND: JVM -// IGNORE_BACKEND_K2: JVM_IR, JS_IR, JS_IR_ES6, NATIVE -// FIR status: KotlinNothingValueException from create() fun create(modelClass: Class): T { return if (modelClass.isAssignableFrom(B::class.java)) { diff --git a/compiler/testData/diagnostics/tests/QualifiedExpressions.fir.kt b/compiler/testData/diagnostics/tests/QualifiedExpressions.fir.kt index 07e6140ef21..2b049d57d85 100644 --- a/compiler/testData/diagnostics/tests/QualifiedExpressions.fir.kt +++ b/compiler/testData/diagnostics/tests/QualifiedExpressions.fir.kt @@ -4,8 +4,8 @@ fun test(s: IntRange?) { val a: Int = s?.start val b: Int? = s?.start val c: Int = s?.start ?: -11 - val d: Int = s?.start ?: "empty" - val e: String = s?.start ?: "empty" + val d: Int = s?.start ?: "empty" + val e: String = s?.start ?: "empty" val f: Int = s?.endInclusive ?: b ?: 1 val g: Boolean? = e.startsWith("s")//?.length } diff --git a/compiler/testData/diagnostics/tests/callableReference/adapted/noKFunctionForAdaptation.fir.kt b/compiler/testData/diagnostics/tests/callableReference/adapted/noKFunctionForAdaptation.fir.kt index 9ba9ecbcaaa..d0313c85bb5 100644 --- a/compiler/testData/diagnostics/tests/callableReference/adapted/noKFunctionForAdaptation.fir.kt +++ b/compiler/testData/diagnostics/tests/callableReference/adapted/noKFunctionForAdaptation.fir.kt @@ -6,7 +6,7 @@ fun dump(dumpStrategy: String) { val k0: kotlin.reflect.KFunction0 = returnAdapter(::foo) // Error: ADAPTED_CALLABLE_REFERENCE_AGAINST_REFLECTION_TYPE val k1: kotlin.reflect.KFunction0 = ::foo // Should be error here, too - val k2: kotlin.reflect.KFunction0 = if (dumpStrategy == "KotlinLike") ::foo else ::bar + val k2: kotlin.reflect.KFunction0 = if (dumpStrategy == "KotlinLike") ::foo else ::bar val f0: Function0 = returnAdapter(::foo) val f1: Function0 = ::foo diff --git a/compiler/testData/diagnostics/tests/controlStructures/specialConstructsAndPlatformTypes.fir.kt b/compiler/testData/diagnostics/tests/controlStructures/specialConstructsAndPlatformTypes.fir.kt index f0e6fc7ae31..8d764d4a4fb 100644 --- a/compiler/testData/diagnostics/tests/controlStructures/specialConstructsAndPlatformTypes.fir.kt +++ b/compiler/testData/diagnostics/tests/controlStructures/specialConstructsAndPlatformTypes.fir.kt @@ -29,11 +29,11 @@ val testSafeCall4: String? = J.m[""]?.let { it.toString() } val testIf1: String = if (true) J.s else J.s val testIf2: String? = if (true) J.s else J.s -val testIf3: String = if (true) J.m[""] else J.m[""] +val testIf3: String = if (true) J.m[""] else J.m[""] val testIf4: String? = if (true) J.m[""] else J.m[""] val testWhen1: String = when { else -> J.s } val testWhen2: String? = when { else -> J.s } -val testWhen3: String = when { else -> J.m[""] } +val testWhen3: String = when { else -> J.m[""] } val testWhen4: String? = when { else -> J.m[""] } diff --git a/compiler/testData/diagnostics/tests/inference/checkNotNullWithNullableExpectedType.kt b/compiler/testData/diagnostics/tests/inference/checkNotNullWithNullableExpectedType.kt new file mode 100644 index 00000000000..1a2b229946c --- /dev/null +++ b/compiler/testData/diagnostics/tests/inference/checkNotNullWithNullableExpectedType.kt @@ -0,0 +1,11 @@ +// FIR_IDENTICAL +// DIAGNOSTICS: -UNCHECKED_CAST + +interface I +interface I2 : I + +fun I.cast(): T? = this as? T + +fun foo(i: I): I2? { + return i.cast()!! +} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/inference/constraints/wrongExpectedTypeForWhen.fir.kt b/compiler/testData/diagnostics/tests/inference/constraints/wrongExpectedTypeForWhen.fir.kt new file mode 100644 index 00000000000..aff1c74df13 --- /dev/null +++ b/compiler/testData/diagnostics/tests/inference/constraints/wrongExpectedTypeForWhen.fir.kt @@ -0,0 +1,9 @@ +fun foo() { + var f: Int = if (true) { x: Long -> } else { x: Long -> } +} + +class A { + var x: Int + get(): Int = if (true) { {42} } else { {24} } + set(i: Int) {} +} diff --git a/compiler/testData/diagnostics/tests/inference/constraints/wrongExpectedTypeForWhen.kt b/compiler/testData/diagnostics/tests/inference/constraints/wrongExpectedTypeForWhen.kt new file mode 100644 index 00000000000..dcd9f1697e9 --- /dev/null +++ b/compiler/testData/diagnostics/tests/inference/constraints/wrongExpectedTypeForWhen.kt @@ -0,0 +1,9 @@ +fun foo() { + var f: Int = if (true) { x: Long -> } else { x: Long -> } +} + +class A { + var x: Int + get(): Int = if (true) { {42} } else { {24} } + set(i: Int) {} +} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/emptyIntersectionOnIf.fir.kt b/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/emptyIntersectionOnIf.fir.kt deleted file mode 100644 index 97201bcfc8e..00000000000 --- a/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/emptyIntersectionOnIf.fir.kt +++ /dev/null @@ -1,8 +0,0 @@ -// ISSUE: KT-57649 - -open class A -abstract class B { - fun test(current: A): A? = - // K2 reports empty intersection here due to the smart cast from A to B, where A & B aren't compatible - if (current === this) current else null -} diff --git a/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/emptyIntersectionOnIf.kt b/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/emptyIntersectionOnIf.kt index 42118474bdf..637bad2582c 100644 --- a/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/emptyIntersectionOnIf.kt +++ b/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/emptyIntersectionOnIf.kt @@ -1,8 +1,8 @@ +// FIR_IDENTICAL // ISSUE: KT-57649 open class A abstract class B { fun test(current: A): A? = - // K2 reports empty intersection here due to the smart cast from A to B, where A & B aren't compatible if (current === this) current else null } diff --git a/compiler/testData/diagnostics/tests/inference/extensionLambdasAndArrow.fir.kt b/compiler/testData/diagnostics/tests/inference/extensionLambdasAndArrow.fir.kt index 7f163d1b549..20966a4409c 100644 --- a/compiler/testData/diagnostics/tests/inference/extensionLambdasAndArrow.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/extensionLambdasAndArrow.fir.kt @@ -10,7 +10,7 @@ fun main() { val x41: String.(String) -> String = if (true) {{ str: String, str2: String -> "this" }} else {{ str: String, str2: String -> "this" }} val x42: String.(String) -> String = if (true) {{ str, str2 -> "this" }} else {{ str, str2 -> "this" }} val x5: String.() -> String = if (true) {{ str -> "this" }} else {{ str -> "this" }} - val x6: String.() -> String = if (true) {{ str -> "this" }} else {{ "this" }} + val x6: String.() -> String = if (true) {{ str -> "this" }} else {{ "this" }} val x7: String.() -> String = select({ -> this }, { -> this }) val x8: String.() -> String = select({ this }, { this }) } diff --git a/compiler/testData/diagnostics/tests/inference/ifWithDependentBranches.fir.kt b/compiler/testData/diagnostics/tests/inference/ifWithDependentBranches.fir.kt deleted file mode 100644 index 033680524ff..00000000000 --- a/compiler/testData/diagnostics/tests/inference/ifWithDependentBranches.fir.kt +++ /dev/null @@ -1,62 +0,0 @@ -// SKIP_TXT - -interface Additional -interface A : Additional - -fun aOf(): A = TODO() - -interface B - -fun B.convert(): A = TODO() - -fun foo1(x: B): Any { - return if (x.hashCode() == 0) aOf() else x.convert() -} - -fun foo2(x: B): Additional { - return if (x.hashCode() == 0) aOf() else x.convert() -} - -fun foo3(x: B): Any { - return when { - x.hashCode() == 0 -> aOf() - else -> x.convert() - } -} - -fun foo4(x: B): Additional { - return when { - x.hashCode() == 0 -> aOf() - else -> x.convert() - } -} - -fun foo5(x: B): Any { - return if (x.hashCode() == 0) { - aOf() - } else { - x.convert() - } -} - -fun foo6(x: B): Additional { - return if (x.hashCode() == 0) { - aOf() - } else { - x.convert() - } -} - -fun foo7(x: B): Any { - return when { - x.hashCode() == 0 -> { aOf() } - else -> { x.convert() } - } -} - -fun foo8(x: B): Additional { - return when { - x.hashCode() == 0 -> { aOf() } - else -> { x.convert() } - } -} diff --git a/compiler/testData/diagnostics/tests/inference/ifWithDependentBranches.kt b/compiler/testData/diagnostics/tests/inference/ifWithDependentBranches.kt index ffec5988699..4ccdb2f9482 100644 --- a/compiler/testData/diagnostics/tests/inference/ifWithDependentBranches.kt +++ b/compiler/testData/diagnostics/tests/inference/ifWithDependentBranches.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // SKIP_TXT interface Additional diff --git a/compiler/testData/diagnostics/tests/inference/nestedIfWithExpectedType.kt b/compiler/testData/diagnostics/tests/inference/nestedIfWithExpectedType.kt new file mode 100644 index 00000000000..e8a075aaa37 --- /dev/null +++ b/compiler/testData/diagnostics/tests/inference/nestedIfWithExpectedType.kt @@ -0,0 +1,24 @@ +// FIR_IDENTICAL +interface Promise + +fun materializePromise(): Promise = TODO() + +fun foo(x: Int, p1: Promise, p2: Promise): Promise<*> { + return if (x == 0) { + p1 + } else { + if (x == 3) { + materializePromise() + } else { + p2 + } + } +} + +fun foo2(x: Int, p2: Promise): Promise<*> { + return if (x == 3) { + materializePromise() + } else { + p2 + } +} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/inference/nothingType/reifiedParameterWithRecursiveBound.fir.kt b/compiler/testData/diagnostics/tests/inference/nothingType/reifiedParameterWithRecursiveBound.fir.kt deleted file mode 100644 index 5cab6b40c44..00000000000 --- a/compiler/testData/diagnostics/tests/inference/nothingType/reifiedParameterWithRecursiveBound.fir.kt +++ /dev/null @@ -1,34 +0,0 @@ -// Issue: KT-37621 - -class Inv -class In -class Out - -inline fun > invBound(): TB = TODO() -inline fun > inBound(): IB = TODO() -inline fun > outBound(): OB = TODO() - -inline fun > testInv(): T { - return try { - invBound() - } catch (ex: Exception) { - throw Exception() - } -} - -inline fun > testIn(): T { - return try { - inBound() - } catch (ex: Exception) { - throw Exception() - } -} - -// Unexpected behaviour -inline fun > testOut(): T { - return try { - outBound() - } catch (ex: Exception) { - throw Exception() - } -} diff --git a/compiler/testData/diagnostics/tests/inference/nothingType/reifiedParameterWithRecursiveBound.kt b/compiler/testData/diagnostics/tests/inference/nothingType/reifiedParameterWithRecursiveBound.kt index 032f3e27e63..2de40632be5 100644 --- a/compiler/testData/diagnostics/tests/inference/nothingType/reifiedParameterWithRecursiveBound.kt +++ b/compiler/testData/diagnostics/tests/inference/nothingType/reifiedParameterWithRecursiveBound.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // Issue: KT-37621 class Inv diff --git a/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/AssertNotNull.fir.kt b/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/AssertNotNull.fir.kt index 8a7e137060e..802373b198f 100644 --- a/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/AssertNotNull.fir.kt +++ b/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/AssertNotNull.fir.kt @@ -33,6 +33,6 @@ fun main() { } } - val f : String = a!! + val f : String = a!! checkSubtype(a!!) } diff --git a/compiler/testData/diagnostics/tests/regressions/TypeMismatchOnUnaryOperations.fir.kt b/compiler/testData/diagnostics/tests/regressions/TypeMismatchOnUnaryOperations.fir.kt index c85184cebf4..57fa3595ffe 100644 --- a/compiler/testData/diagnostics/tests/regressions/TypeMismatchOnUnaryOperations.fir.kt +++ b/compiler/testData/diagnostics/tests/regressions/TypeMismatchOnUnaryOperations.fir.kt @@ -4,7 +4,7 @@ fun main() { val a : Int? = null; var v = 1 val b : String = v; - val f : String = a!!; + val f : String = a!!; val g : String = v++; val g1 : String = ++v; val h : String = v--; diff --git a/compiler/testData/diagnostics/tests/when/kt9929.fir.kt b/compiler/testData/diagnostics/tests/when/kt9929.fir.kt index 1b0d08a2db3..7e60d9c30d8 100644 --- a/compiler/testData/diagnostics/tests/when/kt9929.fir.kt +++ b/compiler/testData/diagnostics/tests/when/kt9929.fir.kt @@ -1,4 +1,4 @@ -val test: Int = if (true) { +val test: Int = if (true) { when (2) { 1 -> 1 else -> null @@ -6,4 +6,4 @@ val test: Int = if (true) { } else { 2 -} +} diff --git a/compiler/testData/diagnostics/tests/when/kt9972.fir.kt b/compiler/testData/diagnostics/tests/when/kt9972.fir.kt index 84fdfb84adf..4b3dde1f7d0 100644 --- a/compiler/testData/diagnostics/tests/when/kt9972.fir.kt +++ b/compiler/testData/diagnostics/tests/when/kt9972.fir.kt @@ -10,7 +10,7 @@ */ fun test1(): Int { - val x: String = if (true) { + val x: String = if (true) { when { true -> Any() else -> null @@ -20,9 +20,9 @@ fun test1(): Int { } fun test2(): Int { - val x: String = when { + val x: String = when { true -> Any() else -> null - } ?: return 0 + } ?: return 0 return x.hashCode() } diff --git a/compiler/testData/diagnostics/tests/when/whenAndLambdaWithExpectedType.fir.kt b/compiler/testData/diagnostics/tests/when/whenAndLambdaWithExpectedType.fir.kt index 45a2c4589cc..1f68ec60db7 100644 --- a/compiler/testData/diagnostics/tests/when/whenAndLambdaWithExpectedType.fir.kt +++ b/compiler/testData/diagnostics/tests/when/whenAndLambdaWithExpectedType.fir.kt @@ -28,7 +28,7 @@ val test3: (String) -> Boolean = } val test4: (String) -> Boolean = - when { + when { true -> { s1, s2 -> true } else -> null!! - } + } diff --git a/compiler/testData/diagnostics/testsWithStdLib/tryCatch/assignTry.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/tryCatch/assignTry.fir.kt index a04b918628c..2f3683bacfe 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/tryCatch/assignTry.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/tryCatch/assignTry.fir.kt @@ -5,7 +5,7 @@ class ExcA : Exception() class ExcB : Exception() fun test2() { - val s: String? = try { + val s: String? = try { "" } catch (e: ExcA) { diff --git a/compiler/testData/ir/irText/expressions/implicitCastToTypeParameter.fir.ir.txt b/compiler/testData/ir/irText/expressions/implicitCastToTypeParameter.fir.ir.txt index 0c76ceb3802..f28908482f9 100644 --- a/compiler/testData/ir/irText/expressions/implicitCastToTypeParameter.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/implicitCastToTypeParameter.fir.ir.txt @@ -71,7 +71,7 @@ FILE fqName: fileName:/implicitCastToTypeParameter.kt $receiver: VALUE_PARAMETER name: type:.Foo.> BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun (): T of .? declared in ' - WHEN type=kotlin.Any? origin=IF + WHEN type=T of .? origin=IF BRANCH if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=T of . GET_VAR ': .Foo.> declared in .' type=.Foo.> origin=null diff --git a/compiler/testData/ir/irText/expressions/kt50028.fir.ir.txt b/compiler/testData/ir/irText/expressions/kt50028.fir.ir.txt index 7623a2cbe78..58a11614404 100644 --- a/compiler/testData/ir/irText/expressions/kt50028.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/kt50028.fir.ir.txt @@ -2,7 +2,7 @@ FILE fqName: fileName:/kt50028.kt FUN name:test_1 visibility:public modality:FINAL <> () returnType:kotlin.String BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test_1 (): kotlin.String declared in ' - WHEN type=kotlin.Nothing origin=WHEN + WHEN type=kotlin.String origin=WHEN BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: BLOCK type=kotlin.Unit origin=null diff --git a/compiler/testData/ir/irText/fakeOverrides/annotations/basicNullabilityAnnotationOverride.fir.ir.txt b/compiler/testData/ir/irText/fakeOverrides/annotations/basicNullabilityAnnotationOverride.fir.ir.txt index c4437fca2bd..6a8e4f33fa7 100644 --- a/compiler/testData/ir/irText/fakeOverrides/annotations/basicNullabilityAnnotationOverride.fir.ir.txt +++ b/compiler/testData/ir/irText/fakeOverrides/annotations/basicNullabilityAnnotationOverride.fir.ir.txt @@ -56,7 +56,7 @@ FILE fqName: fileName:/1.kt $this: VALUE_PARAMETER name: type:.B BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun bar (): kotlin.String declared in .B' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.String origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null FUN name:foo visibility:public modality:OPEN <> ($this:.B, s:kotlin.String?) returnType:kotlin.Unit diff --git a/compiler/testData/ir/irText/fakeOverrides/charsequence/javaCharSequenceOverride.fir.ir.txt b/compiler/testData/ir/irText/fakeOverrides/charsequence/javaCharSequenceOverride.fir.ir.txt index d9cedce1a71..99e8b8010f6 100644 --- a/compiler/testData/ir/irText/fakeOverrides/charsequence/javaCharSequenceOverride.fir.ir.txt +++ b/compiler/testData/ir/irText/fakeOverrides/charsequence/javaCharSequenceOverride.fir.ir.txt @@ -49,7 +49,7 @@ FILE fqName: fileName:/1.kt VALUE_PARAMETER name:end index:1 type:kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun subSequence (start: kotlin.Int, end: kotlin.Int): kotlin.CharSequence declared in .B' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.CharSequence origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null CLASS CLASS name:C modality:FINAL visibility:public superTypes:[.Java1] @@ -209,7 +209,7 @@ FILE fqName: fileName:/1.kt $this: VALUE_PARAMETER name: type:.E BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun codePoints (): java.util.stream.IntStream declared in .E' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=java.util.stream.IntStream origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null PROPERTY FAKE_OVERRIDE name:length visibility:public modality:OPEN [fake_override,val] @@ -407,7 +407,7 @@ FILE fqName: fileName:/1.kt $this: VALUE_PARAMETER name: type:.H BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun codePoints (): java.util.stream.IntStream declared in .H' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=java.util.stream.IntStream origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null FUN name:get visibility:public modality:OPEN <> ($this:.H, index:kotlin.Number) returnType:kotlin.Char [operator] @@ -483,7 +483,7 @@ FILE fqName: fileName:/1.kt $this: VALUE_PARAMETER name: type:.I BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun codePoints (): java.util.stream.IntStream declared in .I' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=java.util.stream.IntStream origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null PROPERTY FAKE_OVERRIDE name:length visibility:public modality:OPEN [fake_override,val] @@ -588,7 +588,7 @@ FILE fqName: fileName:/1.kt VALUE_PARAMETER name:end index:1 type:kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun subSequence (start: kotlin.Int, end: kotlin.Int): kotlin.CharSequence declared in .K' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.CharSequence origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null CLASS CLASS name:L modality:ABSTRACT visibility:public superTypes:[.Java1; .A] @@ -646,7 +646,7 @@ FILE fqName: fileName:/1.kt $this: VALUE_PARAMETER name: type:.L BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun chars (): java.util.stream.IntStream declared in .L' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=java.util.stream.IntStream origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null FUN name:codePoints visibility:public modality:OPEN <> ($this:.L) returnType:java.util.stream.IntStream @@ -656,7 +656,7 @@ FILE fqName: fileName:/1.kt $this: VALUE_PARAMETER name: type:.L BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun codePoints (): java.util.stream.IntStream declared in .L' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=java.util.stream.IntStream origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null PROPERTY FAKE_OVERRIDE name:length visibility:public modality:OPEN [fake_override,val] @@ -724,7 +724,7 @@ FILE fqName: fileName:/1.kt $this: VALUE_PARAMETER name: type:.M BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun chars (): java.util.stream.IntStream declared in .M' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=java.util.stream.IntStream origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null FUN name:codePoints visibility:public modality:OPEN <> ($this:.M) returnType:java.util.stream.IntStream @@ -734,7 +734,7 @@ FILE fqName: fileName:/1.kt $this: VALUE_PARAMETER name: type:.M BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun codePoints (): java.util.stream.IntStream declared in .M' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=java.util.stream.IntStream origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null PROPERTY FAKE_OVERRIDE name:length visibility:public modality:OPEN [fake_override,val] diff --git a/compiler/testData/ir/irText/fakeOverrides/charsequence/kotlinCharSequenceOverride.fir.ir.txt b/compiler/testData/ir/irText/fakeOverrides/charsequence/kotlinCharSequenceOverride.fir.ir.txt index 9d3135384f5..21d92bb67d4 100644 --- a/compiler/testData/ir/irText/fakeOverrides/charsequence/kotlinCharSequenceOverride.fir.ir.txt +++ b/compiler/testData/ir/irText/fakeOverrides/charsequence/kotlinCharSequenceOverride.fir.ir.txt @@ -338,7 +338,7 @@ FILE fqName: fileName:/1.kt $this: VALUE_PARAMETER name: type:.F BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun chars (): java.util.stream.IntStream declared in .F' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=java.util.stream.IntStream origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null FUN name:codePoints visibility:public modality:OPEN <> ($this:.F) returnType:java.util.stream.IntStream @@ -348,7 +348,7 @@ FILE fqName: fileName:/1.kt $this: VALUE_PARAMETER name: type:.F BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun codePoints (): java.util.stream.IntStream declared in .F' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=java.util.stream.IntStream origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null FUN name:get visibility:public modality:OPEN <> ($this:.F, index:kotlin.Int) returnType:kotlin.Char [operator] @@ -368,7 +368,7 @@ FILE fqName: fileName:/1.kt VALUE_PARAMETER name:endIndex index:1 type:kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun subSequence (startIndex: kotlin.Int, endIndex: kotlin.Int): kotlin.CharSequence declared in .F' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.CharSequence origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null CLASS CLASS name:G modality:ABSTRACT visibility:public superTypes:[.Java1; .KotlinInterface] @@ -548,7 +548,7 @@ FILE fqName: fileName:/1.kt $this: VALUE_PARAMETER name: type:.I BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun chars (): java.util.stream.IntStream declared in .I' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=java.util.stream.IntStream origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null FUN name:codePoints visibility:public modality:OPEN <> ($this:.I) returnType:java.util.stream.IntStream @@ -558,7 +558,7 @@ FILE fqName: fileName:/1.kt $this: VALUE_PARAMETER name: type:.I BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun codePoints (): java.util.stream.IntStream declared in .I' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=java.util.stream.IntStream origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null FUN name:get visibility:public modality:OPEN <> ($this:.I, index:kotlin.Int) returnType:kotlin.Char [operator] @@ -578,7 +578,7 @@ FILE fqName: fileName:/1.kt VALUE_PARAMETER name:endIndex index:1 type:kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun subSequence (startIndex: kotlin.Int, endIndex: kotlin.Int): kotlin.CharSequence declared in .I' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.CharSequence origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null CLASS INTERFACE name:KotlinInterface modality:ABSTRACT visibility:public superTypes:[kotlin.Any] diff --git a/compiler/testData/ir/irText/fakeOverrides/collections/list/intersectionListOverrideKJJ.fir.ir.txt b/compiler/testData/ir/irText/fakeOverrides/collections/list/intersectionListOverrideKJJ.fir.ir.txt index 623a4565205..06697e7723d 100644 --- a/compiler/testData/ir/irText/fakeOverrides/collections/list/intersectionListOverrideKJJ.fir.ir.txt +++ b/compiler/testData/ir/irText/fakeOverrides/collections/list/intersectionListOverrideKJJ.fir.ir.txt @@ -315,7 +315,7 @@ FILE fqName: fileName:/1.kt $this: VALUE_PARAMETER name: type:.A BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun spliterator (): java.util.Spliterator declared in .A' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=java.util.Spliterator origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null PROPERTY FAKE_OVERRIDE name:size visibility:public modality:OPEN [fake_override,val] diff --git a/compiler/testData/ir/irText/fakeOverrides/collections/map/substitutionMapOverrideOnKJKJ.fir.ir.txt b/compiler/testData/ir/irText/fakeOverrides/collections/map/substitutionMapOverrideOnKJKJ.fir.ir.txt index f22d65cab57..45922a6b09f 100644 --- a/compiler/testData/ir/irText/fakeOverrides/collections/map/substitutionMapOverrideOnKJKJ.fir.ir.txt +++ b/compiler/testData/ir/irText/fakeOverrides/collections/map/substitutionMapOverrideOnKJKJ.fir.ir.txt @@ -358,7 +358,7 @@ FILE fqName: fileName:/1.kt $this: VALUE_PARAMETER name: type:.B.B> BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun isEmpty (): kotlin.Boolean declared in .B' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null PROPERTY FAKE_OVERRIDE name:entries visibility:public modality:ABSTRACT [fake_override,val] diff --git a/compiler/testData/ir/irText/fakeOverrides/collections/set/intersectionSetOverrideKJJ.fir.ir.txt b/compiler/testData/ir/irText/fakeOverrides/collections/set/intersectionSetOverrideKJJ.fir.ir.txt index c5f56ca2559..dcd41d97ee6 100644 --- a/compiler/testData/ir/irText/fakeOverrides/collections/set/intersectionSetOverrideKJJ.fir.ir.txt +++ b/compiler/testData/ir/irText/fakeOverrides/collections/set/intersectionSetOverrideKJJ.fir.ir.txt @@ -150,7 +150,7 @@ FILE fqName: fileName:/1.kt $this: VALUE_PARAMETER name: type:.A BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun spliterator (): java.util.Spliterator declared in .A' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=java.util.Spliterator origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null PROPERTY FAKE_OVERRIDE name:size visibility:public modality:OPEN [fake_override,val] @@ -320,7 +320,7 @@ FILE fqName: fileName:/1.kt $this: VALUE_PARAMETER name: type:.B BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun spliterator (): java.util.Spliterator declared in .B' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=java.util.Spliterator origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null PROPERTY FAKE_OVERRIDE name:size visibility:public modality:OPEN [fake_override,val] diff --git a/compiler/testData/ir/irText/fakeOverrides/collections/set/intersectionSetOverrideKJK.fir.ir.txt b/compiler/testData/ir/irText/fakeOverrides/collections/set/intersectionSetOverrideKJK.fir.ir.txt index 2242b5fb711..1ebad814fda 100644 --- a/compiler/testData/ir/irText/fakeOverrides/collections/set/intersectionSetOverrideKJK.fir.ir.txt +++ b/compiler/testData/ir/irText/fakeOverrides/collections/set/intersectionSetOverrideKJK.fir.ir.txt @@ -150,7 +150,7 @@ FILE fqName: fileName:/1.kt $this: VALUE_PARAMETER name: type:.A BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun spliterator (): java.util.Spliterator declared in .A' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=java.util.Spliterator origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null PROPERTY FAKE_OVERRIDE name:size visibility:public modality:OPEN [fake_override,val] @@ -317,7 +317,7 @@ FILE fqName: fileName:/1.kt $this: VALUE_PARAMETER name: type:.B BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun spliterator (): java.util.Spliterator declared in .B' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=java.util.Spliterator origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null PROPERTY name:size visibility:public modality:OPEN [val] diff --git a/compiler/testData/ir/irText/fakeOverrides/collections/set/setOverrideKJK.fir.ir.txt b/compiler/testData/ir/irText/fakeOverrides/collections/set/setOverrideKJK.fir.ir.txt index be6d0c3cd56..368773d1bcd 100644 --- a/compiler/testData/ir/irText/fakeOverrides/collections/set/setOverrideKJK.fir.ir.txt +++ b/compiler/testData/ir/irText/fakeOverrides/collections/set/setOverrideKJK.fir.ir.txt @@ -224,7 +224,7 @@ FILE fqName: fileName:/1.kt $this: VALUE_PARAMETER name: type:.B BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun iterator (): kotlin.collections.MutableIterator declared in .B' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.collections.MutableIterator origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null FUN name:test visibility:public modality:FINAL <> (a:.A, b:.B) returnType:kotlin.Unit diff --git a/compiler/testData/ir/irText/fakeOverrides/collections/set/setOverrideOnComplexHierarchy.fir.ir.txt b/compiler/testData/ir/irText/fakeOverrides/collections/set/setOverrideOnComplexHierarchy.fir.ir.txt index 5e44294408c..7d5011e1173 100644 --- a/compiler/testData/ir/irText/fakeOverrides/collections/set/setOverrideOnComplexHierarchy.fir.ir.txt +++ b/compiler/testData/ir/irText/fakeOverrides/collections/set/setOverrideOnComplexHierarchy.fir.ir.txt @@ -760,7 +760,7 @@ FILE fqName: fileName:/1.kt $this: VALUE_PARAMETER name: type:.E BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun spliterator (): java.util.Spliterator declared in .E' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=java.util.Spliterator origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null PROPERTY FAKE_OVERRIDE name:size visibility:public modality:OPEN [fake_override,val] diff --git a/compiler/testData/ir/irText/fakeOverrides/generics/basicGenericWithBoundsOverride.fir.ir.txt b/compiler/testData/ir/irText/fakeOverrides/generics/basicGenericWithBoundsOverride.fir.ir.txt index 014f665adee..688fa849d19 100644 --- a/compiler/testData/ir/irText/fakeOverrides/generics/basicGenericWithBoundsOverride.fir.ir.txt +++ b/compiler/testData/ir/irText/fakeOverrides/generics/basicGenericWithBoundsOverride.fir.ir.txt @@ -177,7 +177,7 @@ FILE fqName: fileName:/1.kt $this: VALUE_PARAMETER name: type:.F BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun bar (): U of .F.bar declared in .F' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=U of .F.bar origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null FUN name:foo visibility:public modality:OPEN ($this:.F, a:U of .F.foo) returnType:kotlin.Unit diff --git a/compiler/testData/ir/irText/fakeOverrides/generics/basicRawTypeOverride.fir.ir.txt b/compiler/testData/ir/irText/fakeOverrides/generics/basicRawTypeOverride.fir.ir.txt index 66d098d6ade..7d4107c3170 100644 --- a/compiler/testData/ir/irText/fakeOverrides/generics/basicRawTypeOverride.fir.ir.txt +++ b/compiler/testData/ir/irText/fakeOverrides/generics/basicRawTypeOverride.fir.ir.txt @@ -52,7 +52,7 @@ FILE fqName: fileName:/1.kt $this: VALUE_PARAMETER name: type:.B BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun bar (): kotlin.collections.MutableList declared in .B' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.collections.MutableList origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null FUN name:foo visibility:public modality:OPEN <> ($this:.B, a:kotlin.collections.MutableList) returnType:kotlin.Unit diff --git a/compiler/testData/ir/irText/fakeOverrides/generics/basicWilcardsOverride.fir.ir.txt b/compiler/testData/ir/irText/fakeOverrides/generics/basicWilcardsOverride.fir.ir.txt index a0944e9569f..6e945dec291 100644 --- a/compiler/testData/ir/irText/fakeOverrides/generics/basicWilcardsOverride.fir.ir.txt +++ b/compiler/testData/ir/irText/fakeOverrides/generics/basicWilcardsOverride.fir.ir.txt @@ -70,7 +70,7 @@ FILE fqName: fileName:/test.kt $this: VALUE_PARAMETER name: type:.B BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun bar (): kotlin.collections.MutableList declared in .B' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.collections.MutableList origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null FUN name:bar2 visibility:public modality:OPEN <> ($this:.B) returnType:kotlin.collections.MutableList @@ -79,7 +79,7 @@ FILE fqName: fileName:/test.kt $this: VALUE_PARAMETER name: type:.B BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun bar2 (): kotlin.collections.MutableList declared in .B' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.collections.MutableList origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null FUN name:bar3 visibility:public modality:OPEN <> ($this:.B) returnType:kotlin.collections.MutableList<*> @@ -88,7 +88,7 @@ FILE fqName: fileName:/test.kt $this: VALUE_PARAMETER name: type:.B BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun bar3 (): kotlin.collections.MutableList<*> declared in .B' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.collections.MutableList<*> origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null FUN name:foo visibility:public modality:OPEN <> ($this:.B, a:kotlin.collections.MutableList?) returnType:kotlin.Unit diff --git a/compiler/testData/ir/irText/fakeOverrides/generics/genericMethodOverrideOnComplexHierarchy.fir.ir.txt b/compiler/testData/ir/irText/fakeOverrides/generics/genericMethodOverrideOnComplexHierarchy.fir.ir.txt index 30dc9e94b2f..988612bb38a 100644 --- a/compiler/testData/ir/irText/fakeOverrides/generics/genericMethodOverrideOnComplexHierarchy.fir.ir.txt +++ b/compiler/testData/ir/irText/fakeOverrides/generics/genericMethodOverrideOnComplexHierarchy.fir.ir.txt @@ -213,7 +213,7 @@ FILE fqName: fileName:/1.kt $this: VALUE_PARAMETER name: type:.E BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun bar (): T of .E.bar declared in .E' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=T of .E.bar origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null CLASS CLASS name:F modality:FINAL visibility:public superTypes:[.KotlinClass; .Java2] diff --git a/compiler/testData/ir/irText/fakeOverrides/generics/intersectionRawTypeOverride.fir.ir.txt b/compiler/testData/ir/irText/fakeOverrides/generics/intersectionRawTypeOverride.fir.ir.txt index 9deae215966..fcf3912d82f 100644 --- a/compiler/testData/ir/irText/fakeOverrides/generics/intersectionRawTypeOverride.fir.ir.txt +++ b/compiler/testData/ir/irText/fakeOverrides/generics/intersectionRawTypeOverride.fir.ir.txt @@ -146,7 +146,7 @@ FILE fqName: fileName:/1.kt $this: VALUE_PARAMETER name: type:.D BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun bar (): kotlin.collections.List declared in .D' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.collections.List origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null FUN name:foo visibility:public modality:OPEN <> ($this:.D, a:kotlin.collections.List) returnType:kotlin.Unit diff --git a/compiler/testData/ir/irText/fakeOverrides/java21/sequenceCollectionIntersectionOverrideKJJ.fir.ir.txt b/compiler/testData/ir/irText/fakeOverrides/java21/sequenceCollectionIntersectionOverrideKJJ.fir.ir.txt index 57a5c46ceb8..53cf10e6bb3 100644 --- a/compiler/testData/ir/irText/fakeOverrides/java21/sequenceCollectionIntersectionOverrideKJJ.fir.ir.txt +++ b/compiler/testData/ir/irText/fakeOverrides/java21/sequenceCollectionIntersectionOverrideKJJ.fir.ir.txt @@ -620,7 +620,7 @@ FILE fqName: fileName:/1.kt $this: VALUE_PARAMETER name: type:.B BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun reversed (): java.util.LinkedList declared in .B' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=java.util.LinkedList origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null PROPERTY FAKE_OVERRIDE name:size visibility:public modality:OPEN [fake_override,val] diff --git a/compiler/testData/ir/irText/fakeOverrides/java21/sequenceCollectionOverride.fir.ir.txt b/compiler/testData/ir/irText/fakeOverrides/java21/sequenceCollectionOverride.fir.ir.txt index f7a417a86f8..2d3297fcf5a 100644 --- a/compiler/testData/ir/irText/fakeOverrides/java21/sequenceCollectionOverride.fir.ir.txt +++ b/compiler/testData/ir/irText/fakeOverrides/java21/sequenceCollectionOverride.fir.ir.txt @@ -276,7 +276,7 @@ FILE fqName: fileName:/1.kt $this: VALUE_PARAMETER name: type:.B BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun reversed (): java.util.SequencedCollection declared in .B' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=java.util.SequencedCollection origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null CLASS CLASS name:C modality:ABSTRACT visibility:public superTypes:[.Java1] @@ -543,7 +543,7 @@ FILE fqName: fileName:/1.kt $this: VALUE_PARAMETER name: type:.D BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun reversed (): java.util.SequencedCollection declared in .D' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=java.util.SequencedCollection origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null PROPERTY name:size visibility:public modality:OPEN [val] diff --git a/compiler/testData/ir/irText/fakeOverrides/java21/sequenceMapIntersectionOverrideKJJ.fir.ir.txt b/compiler/testData/ir/irText/fakeOverrides/java21/sequenceMapIntersectionOverrideKJJ.fir.ir.txt index 1ddb92b0851..f529e7a50f8 100644 --- a/compiler/testData/ir/irText/fakeOverrides/java21/sequenceMapIntersectionOverrideKJJ.fir.ir.txt +++ b/compiler/testData/ir/irText/fakeOverrides/java21/sequenceMapIntersectionOverrideKJJ.fir.ir.txt @@ -445,7 +445,7 @@ FILE fqName: fileName:/1.kt $this: VALUE_PARAMETER name: type:.B BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun reversed (): java.util.SequencedMap declared in .B' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=java.util.SequencedMap origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null PROPERTY FAKE_OVERRIDE name:entries visibility:public modality:OPEN [fake_override,val] diff --git a/compiler/testData/ir/irText/fakeOverrides/java21/sequenceMapOverride.fir.ir.txt b/compiler/testData/ir/irText/fakeOverrides/java21/sequenceMapOverride.fir.ir.txt index be734107843..a581c7b825f 100644 --- a/compiler/testData/ir/irText/fakeOverrides/java21/sequenceMapOverride.fir.ir.txt +++ b/compiler/testData/ir/irText/fakeOverrides/java21/sequenceMapOverride.fir.ir.txt @@ -371,7 +371,7 @@ FILE fqName: fileName:/1.kt $this: VALUE_PARAMETER name: type:.B BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun firstEntry (): kotlin.collections.MutableMap.MutableEntry declared in .B' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.collections.MutableMap.MutableEntry origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null FUN name:putFirst visibility:public modality:OPEN <> ($this:.B, k:kotlin.Any?, v:kotlin.Any?) returnType:kotlin.Any @@ -1251,7 +1251,7 @@ FILE fqName: fileName:/1.kt $this: VALUE_PARAMETER name: type:.F BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun reversed (): java.util.SequencedMap declared in .F' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=java.util.SequencedMap origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null PROPERTY FAKE_OVERRIDE name:entries visibility:public modality:ABSTRACT [fake_override,val] diff --git a/compiler/testData/ir/irText/fakeOverrides/java21/sequenceMapOverrideKJ.fir.ir.txt b/compiler/testData/ir/irText/fakeOverrides/java21/sequenceMapOverrideKJ.fir.ir.txt index 48a0bdd82ab..0fa8e0d7127 100644 --- a/compiler/testData/ir/irText/fakeOverrides/java21/sequenceMapOverrideKJ.fir.ir.txt +++ b/compiler/testData/ir/irText/fakeOverrides/java21/sequenceMapOverrideKJ.fir.ir.txt @@ -379,7 +379,7 @@ FILE fqName: fileName:/1.kt $this: VALUE_PARAMETER name: type:.B BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun firstEntry (): kotlin.collections.MutableMap.MutableEntry declared in .B' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.collections.MutableMap.MutableEntry origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null FUN name:pollFirstEntry visibility:public modality:OPEN <> ($this:.B) returnType:kotlin.collections.MutableMap.MutableEntry @@ -388,7 +388,7 @@ FILE fqName: fileName:/1.kt $this: VALUE_PARAMETER name: type:.B BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun pollFirstEntry (): kotlin.collections.MutableMap.MutableEntry declared in .B' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.collections.MutableMap.MutableEntry origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null FUN name:putFirst visibility:public modality:OPEN <> ($this:.B, k:kotlin.Any?, v:kotlin.Any?) returnType:kotlin.Any @@ -406,7 +406,7 @@ FILE fqName: fileName:/1.kt $this: VALUE_PARAMETER name: type:.B BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun reversed (): java.util.SequencedMap declared in .B' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=java.util.SequencedMap origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null FUN name:sequencedKeySet visibility:public modality:OPEN <> ($this:.B) returnType:java.util.SequencedSet @@ -415,7 +415,7 @@ FILE fqName: fileName:/1.kt $this: VALUE_PARAMETER name: type:.B BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun sequencedKeySet (): java.util.SequencedSet declared in .B' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=java.util.SequencedSet origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null PROPERTY FAKE_OVERRIDE name:entries visibility:public modality:ABSTRACT [fake_override,val] diff --git a/compiler/testData/ir/irText/fakeOverrides/java21/sequenceSetIntersectionOverrideKJJ.fir.ir.txt b/compiler/testData/ir/irText/fakeOverrides/java21/sequenceSetIntersectionOverrideKJJ.fir.ir.txt index 0fe79dac8a3..ead69a2d7d5 100644 --- a/compiler/testData/ir/irText/fakeOverrides/java21/sequenceSetIntersectionOverrideKJJ.fir.ir.txt +++ b/compiler/testData/ir/irText/fakeOverrides/java21/sequenceSetIntersectionOverrideKJJ.fir.ir.txt @@ -164,7 +164,7 @@ FILE fqName: fileName:/1.kt $this: VALUE_PARAMETER name: type:.A BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun spliterator (): java.util.Spliterator declared in .A' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=java.util.Spliterator origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null PROPERTY FAKE_OVERRIDE name:size visibility:public modality:OPEN [fake_override,val] @@ -337,7 +337,7 @@ FILE fqName: fileName:/1.kt $this: VALUE_PARAMETER name: type:.B BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun reversed (): java.util.SequencedSet declared in .B' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=java.util.SequencedSet origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null FUN name:spliterator visibility:public modality:OPEN <> ($this:.B) returnType:java.util.Spliterator @@ -347,7 +347,7 @@ FILE fqName: fileName:/1.kt $this: VALUE_PARAMETER name: type:.B BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun spliterator (): java.util.Spliterator declared in .B' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=java.util.Spliterator origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null PROPERTY FAKE_OVERRIDE name:size visibility:public modality:OPEN [fake_override,val] diff --git a/compiler/testData/ir/irText/fakeOverrides/java21/sequenceSetIntersectionOverrideKJK.fir.ir.txt b/compiler/testData/ir/irText/fakeOverrides/java21/sequenceSetIntersectionOverrideKJK.fir.ir.txt index 6465981c738..819bc6edbf2 100644 --- a/compiler/testData/ir/irText/fakeOverrides/java21/sequenceSetIntersectionOverrideKJK.fir.ir.txt +++ b/compiler/testData/ir/irText/fakeOverrides/java21/sequenceSetIntersectionOverrideKJK.fir.ir.txt @@ -360,7 +360,7 @@ FILE fqName: fileName:/1.kt $this: VALUE_PARAMETER name: type:.B BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun reversed (): java.util.SortedSet declared in .B' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=java.util.SortedSet origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null CLASS CLASS name:C modality:ABSTRACT visibility:public superTypes:[java.util.SortedSet; kotlin.collections.MutableSet] diff --git a/compiler/testData/ir/irText/fakeOverrides/java21/sequenceSetOverride.fir.ir.txt b/compiler/testData/ir/irText/fakeOverrides/java21/sequenceSetOverride.fir.ir.txt index e48b1fde2eb..f87bc2d6c46 100644 --- a/compiler/testData/ir/irText/fakeOverrides/java21/sequenceSetOverride.fir.ir.txt +++ b/compiler/testData/ir/irText/fakeOverrides/java21/sequenceSetOverride.fir.ir.txt @@ -327,7 +327,7 @@ FILE fqName: fileName:/1.kt $this: VALUE_PARAMETER name: type:.B BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun reversed (): java.util.LinkedHashSet declared in .B' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=java.util.LinkedHashSet origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null CLASS CLASS name:C modality:ABSTRACT visibility:public superTypes:[.Java1] @@ -607,7 +607,7 @@ FILE fqName: fileName:/1.kt $this: VALUE_PARAMETER name: type:.D BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun reversed (): java.util.SequencedSet declared in .D' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=java.util.SequencedSet origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null CLASS CLASS name:E modality:ABSTRACT visibility:public superTypes:[.Java1; .Java2] @@ -892,7 +892,7 @@ FILE fqName: fileName:/1.kt $this: VALUE_PARAMETER name: type:.F BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun reversed (): java.util.SequencedSet declared in .F' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=java.util.SequencedSet origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null CLASS CLASS name:G modality:ABSTRACT visibility:public superTypes:[.KotlinInterface; .Java2] @@ -1177,7 +1177,7 @@ FILE fqName: fileName:/1.kt $this: VALUE_PARAMETER name: type:.H BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun reversed (): java.util.SequencedSet declared in .H' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=java.util.SequencedSet origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null CLASS CLASS name:I modality:ABSTRACT visibility:public superTypes:[.Java3] @@ -1440,7 +1440,7 @@ FILE fqName: fileName:/1.kt $this: VALUE_PARAMETER name: type:.J BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun reversed (): java.util.SequencedSet declared in .J' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=java.util.SequencedSet origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null PROPERTY FAKE_OVERRIDE name:size visibility:public modality:ABSTRACT [fake_override,val] diff --git a/compiler/testData/ir/irText/fakeOverrides/javastatic/staticOverrideOnKJ.fir.ir.txt b/compiler/testData/ir/irText/fakeOverrides/javastatic/staticOverrideOnKJ.fir.ir.txt new file mode 100644 index 00000000000..01d9d438891 --- /dev/null +++ b/compiler/testData/ir/irText/fakeOverrides/javastatic/staticOverrideOnKJ.fir.ir.txt @@ -0,0 +1,64 @@ +FILE fqName: fileName:/1.kt + CLASS CLASS name:A modality:FINAL visibility:public superTypes:[.Java1] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.A + CONSTRUCTOR visibility:public <> () returnType:.A [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in .Java1' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:A modality:FINAL visibility:public superTypes:[.Java1]' + FUN FAKE_OVERRIDE name:bar visibility:public modality:OPEN <> () returnType:@[FlexibleNullability] kotlin.Any? [fake_override] + overridden: + public open fun bar (): @[FlexibleNullability] kotlin.Any? declared in .Java1 + 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 declared in .Java1 + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:foo visibility:public modality:OPEN <> (t:@[FlexibleNullability] kotlin.Any?) returnType:kotlin.Unit [fake_override] + overridden: + public open fun foo (t: @[FlexibleNullability] kotlin.Any?): kotlin.Unit declared in .Java1 + VALUE_PARAMETER name:t index:0 type:@[FlexibleNullability] kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in .Java1 + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in .Java1 + $this: VALUE_PARAMETER name: type:kotlin.Any + CLASS CLASS name:B modality:FINAL visibility:public superTypes:[.Java1] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.B + CONSTRUCTOR visibility:public <> () returnType:.B [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in .Java1' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:B modality:FINAL visibility:public superTypes:[.Java1]' + FUN FAKE_OVERRIDE name:bar visibility:public modality:OPEN <> () returnType:@[FlexibleNullability] kotlin.Any? [fake_override] + overridden: + public open fun bar (): @[FlexibleNullability] kotlin.Any? declared in .Java1 + 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 declared in .Java1 + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:foo visibility:public modality:OPEN <> (t:@[FlexibleNullability] kotlin.Any?) returnType:kotlin.Unit [fake_override] + overridden: + public open fun foo (t: @[FlexibleNullability] kotlin.Any?): kotlin.Unit declared in .Java1 + VALUE_PARAMETER name:t index:0 type:@[FlexibleNullability] kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in .Java1 + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in .Java1 + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN name:bar visibility:public modality:FINAL <> ($this:.B) returnType:kotlin.String + $this: VALUE_PARAMETER name: type:.B + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun bar (): kotlin.String declared in .B' + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.String origin=EXCLEXCL + : kotlin.Nothing + arg0: CONST Null type=kotlin.Nothing? value=null + FUN name:foo visibility:public modality:FINAL <> ($this:.B, t:kotlin.String) returnType:kotlin.Unit + $this: VALUE_PARAMETER name: type:.B + VALUE_PARAMETER name:t index:0 type:kotlin.String + BLOCK_BODY diff --git a/compiler/testData/ir/irText/fakeOverrides/javastatic/staticOverrideOnKJ.fir.kt.txt b/compiler/testData/ir/irText/fakeOverrides/javastatic/staticOverrideOnKJ.fir.kt.txt new file mode 100644 index 00000000000..5da8469d3ee --- /dev/null +++ b/compiler/testData/ir/irText/fakeOverrides/javastatic/staticOverrideOnKJ.fir.kt.txt @@ -0,0 +1,24 @@ +class A : Java1 { + constructor() /* primary */ { + super/*Java1*/() + /* () */ + + } + +} + +class B : Java1 { + constructor() /* primary */ { + super/*Java1*/() + /* () */ + + } + + fun bar(): String { + return CHECK_NOT_NULL(arg0 = null) + } + + fun foo(t: String) { + } + +} diff --git a/compiler/testData/ir/irText/fakeOverrides/javastatic/staticOverrideOnKJ.kt b/compiler/testData/ir/irText/fakeOverrides/javastatic/staticOverrideOnKJ.kt index 76021689ecc..a38eeb57ab5 100644 --- a/compiler/testData/ir/irText/fakeOverrides/javastatic/staticOverrideOnKJ.kt +++ b/compiler/testData/ir/irText/fakeOverrides/javastatic/staticOverrideOnKJ.kt @@ -1,4 +1,3 @@ -// FIR_IDENTICAL // TARGET_BACKEND: JVM // FILE: Java1.java diff --git a/compiler/testData/ir/irText/fakeOverrides/operators/basicOverrideOnComplexHierarchy.fir.ir.txt b/compiler/testData/ir/irText/fakeOverrides/operators/basicOverrideOnComplexHierarchy.fir.ir.txt index 85410dcfd24..75773ff683f 100644 --- a/compiler/testData/ir/irText/fakeOverrides/operators/basicOverrideOnComplexHierarchy.fir.ir.txt +++ b/compiler/testData/ir/irText/fakeOverrides/operators/basicOverrideOnComplexHierarchy.fir.ir.txt @@ -211,7 +211,7 @@ FILE fqName: fileName:/1.kt VALUE_PARAMETER name:i index:0 type:kotlin.Int? BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun plus (i: kotlin.Int?): .Java3 declared in .F' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=.Java3 origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null CLASS INTERFACE name:KotlinInterface modality:ABSTRACT visibility:public superTypes:[.Java3] diff --git a/compiler/testData/ir/irText/fakeOverrides/operators/intersectionOperatorsOverride.fir.ir.txt b/compiler/testData/ir/irText/fakeOverrides/operators/intersectionOperatorsOverride.fir.ir.txt index ee8e430f016..90804b4b1c5 100644 --- a/compiler/testData/ir/irText/fakeOverrides/operators/intersectionOperatorsOverride.fir.ir.txt +++ b/compiler/testData/ir/irText/fakeOverrides/operators/intersectionOperatorsOverride.fir.ir.txt @@ -97,7 +97,7 @@ FILE fqName: fileName:/1.kt VALUE_PARAMETER name:i index:0 type:kotlin.Any? BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun plus (i: kotlin.Any?): .Java2 declared in .B' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=.Java2 origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null FUN name:plus visibility:public modality:OPEN <> ($this:.B, i:kotlin.Int?) returnType:.Java1 [operator] @@ -107,7 +107,7 @@ FILE fqName: fileName:/1.kt VALUE_PARAMETER name:i index:0 type:kotlin.Int? BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun plus (i: kotlin.Int?): .Java1 declared in .B' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=.Java1 origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null CLASS CLASS name:C modality:ABSTRACT visibility:public superTypes:[.KotlinInterface; .Java1] @@ -192,7 +192,7 @@ FILE fqName: fileName:/1.kt VALUE_PARAMETER name:i index:0 type:kotlin.Int? BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun plus (i: kotlin.Int?): .Java1 declared in .D' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=.Java1 origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null CLASS INTERFACE name:KotlinInterface modality:ABSTRACT visibility:public superTypes:[kotlin.Any] diff --git a/compiler/testData/ir/irText/fakeOverrides/platformtypes/intersectionOverrideOnCollections.fir.ir.txt b/compiler/testData/ir/irText/fakeOverrides/platformtypes/intersectionOverrideOnCollections.fir.ir.txt index cd48ea8ad6c..bfea994e3a0 100644 --- a/compiler/testData/ir/irText/fakeOverrides/platformtypes/intersectionOverrideOnCollections.fir.ir.txt +++ b/compiler/testData/ir/irText/fakeOverrides/platformtypes/intersectionOverrideOnCollections.fir.ir.txt @@ -33,7 +33,7 @@ FILE fqName: fileName:/1.kt $this: VALUE_PARAMETER name: type:.B BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun bar (): java.util.ArrayList declared in .B' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=java.util.ArrayList origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null FUN name:bar2 visibility:public modality:OPEN <> ($this:.B) returnType:kotlin.IntArray @@ -43,7 +43,7 @@ FILE fqName: fileName:/1.kt $this: VALUE_PARAMETER name: type:.B BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun bar2 (): kotlin.IntArray declared in .B' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.IntArray origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null FUN name:bar3 visibility:public modality:OPEN <> ($this:.B) returnType:kotlin.Array @@ -53,7 +53,7 @@ FILE fqName: fileName:/1.kt $this: VALUE_PARAMETER name: type:.B BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun bar3 (): kotlin.Array declared in .B' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Array origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null FUN name:foo visibility:public modality:OPEN <> ($this:.B, a:kotlin.collections.MutableList) returnType:kotlin.Unit @@ -105,7 +105,7 @@ FILE fqName: fileName:/1.kt $this: VALUE_PARAMETER name: type:.D BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun bar (): java.util.ArrayList declared in .D' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=java.util.ArrayList origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null FUN name:bar2 visibility:public modality:OPEN <> ($this:.D) returnType:kotlin.IntArray @@ -114,7 +114,7 @@ FILE fqName: fileName:/1.kt $this: VALUE_PARAMETER name: type:.D BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun bar2 (): kotlin.IntArray declared in .D' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.IntArray origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null FUN name:bar3 visibility:public modality:OPEN <> ($this:.D) returnType:kotlin.Array @@ -123,7 +123,7 @@ FILE fqName: fileName:/1.kt $this: VALUE_PARAMETER name: type:.D BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun bar3 (): kotlin.Array declared in .D' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Array origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null FUN name:foo visibility:public modality:OPEN <> ($this:.D, o:java.util.ArrayList) returnType:kotlin.Unit diff --git a/compiler/testData/ir/irText/fakeOverrides/platformtypes/substitutionOverrideOnCollections.fir.ir.txt b/compiler/testData/ir/irText/fakeOverrides/platformtypes/substitutionOverrideOnCollections.fir.ir.txt index 44d2c56226e..473390b18ee 100644 --- a/compiler/testData/ir/irText/fakeOverrides/platformtypes/substitutionOverrideOnCollections.fir.ir.txt +++ b/compiler/testData/ir/irText/fakeOverrides/platformtypes/substitutionOverrideOnCollections.fir.ir.txt @@ -186,7 +186,7 @@ FILE fqName: fileName:/1.kt $this: VALUE_PARAMETER name: type:.D BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun bar (): kotlin.collections.MutableList declared in .D' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.collections.MutableList origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null FUN name:foo visibility:public modality:OPEN <> ($this:.D, a:kotlin.collections.MutableList) returnType:kotlin.Unit @@ -239,7 +239,7 @@ FILE fqName: fileName:/1.kt $this: VALUE_PARAMETER name: type:.E BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun bar3 (): kotlin.collections.MutableSet declared in .E' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.collections.MutableSet origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null FUN name:foo3 visibility:public modality:OPEN <> ($this:.E, c:kotlin.collections.MutableSet) returnType:kotlin.Unit @@ -292,7 +292,7 @@ FILE fqName: fileName:/1.kt $this: VALUE_PARAMETER name: type:.F BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun bar2 (): java.util.Queue declared in .F' - CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=java.util.Queue origin=EXCLEXCL : kotlin.Nothing arg0: CONST Null type=kotlin.Nothing? value=null FUN name:foo2 visibility:public modality:OPEN <> ($this:.F, b:java.util.Queue?) returnType:kotlin.Unit diff --git a/compiler/testData/ir/irText/fakeOverrides/visibility/internalOverrideWithFriendModule.ir.txt b/compiler/testData/ir/irText/fakeOverrides/visibility/internalOverrideWithFriendModule.ir.txt new file mode 100644 index 00000000000..159aa537f63 --- /dev/null +++ b/compiler/testData/ir/irText/fakeOverrides/visibility/internalOverrideWithFriendModule.ir.txt @@ -0,0 +1,30 @@ +FILE fqName: fileName:/KotlinInternal.kt + CLASS CLASS name:KotlinInternal modality:OPEN visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.KotlinInternal + CONSTRUCTOR visibility:public <> () returnType:.KotlinInternal [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:KotlinInternal modality:OPEN visibility:public superTypes:[kotlin.Any]' + 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 declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN name:foo visibility:internal modality:OPEN <> ($this:.KotlinInternal) returnType:kotlin.Unit + $this: VALUE_PARAMETER name: type:.KotlinInternal + BLOCK_BODY + PROPERTY name:a visibility:internal modality:OPEN [val] + FUN name: visibility:internal modality:OPEN <> ($this:.KotlinInternal) returnType:kotlin.Int + correspondingProperty: PROPERTY name:a visibility:internal modality:OPEN [val] + $this: VALUE_PARAMETER name: type:.KotlinInternal + BLOCK_BODY + RETURN type=kotlin.Nothing from='internal open fun (): kotlin.Int declared in .KotlinInternal' + CONST Int type=kotlin.Int value=1 diff --git a/compiler/testData/ir/irText/fakeOverrides/visibility/internalOverrideWithFriendModule.kt.txt b/compiler/testData/ir/irText/fakeOverrides/visibility/internalOverrideWithFriendModule.kt.txt new file mode 100644 index 00000000000..a0ce0c79bae --- /dev/null +++ b/compiler/testData/ir/irText/fakeOverrides/visibility/internalOverrideWithFriendModule.kt.txt @@ -0,0 +1,18 @@ +// FILE: KotlinInternal.kt + +open class KotlinInternal { + constructor() /* primary */ { + super/*Any*/() + /* () */ + + } + + internal open fun foo() { + } + + internal open val a: Int + internal open get(): Int { + return 1 + } + +} diff --git a/compiler/testData/ir/irText/fakeOverrides/visibility/internalOverrideWithFriendModule.sig.kt.txt b/compiler/testData/ir/irText/fakeOverrides/visibility/internalOverrideWithFriendModule.sig.kt.txt new file mode 100644 index 00000000000..fa5557719e3 --- /dev/null +++ b/compiler/testData/ir/irText/fakeOverrides/visibility/internalOverrideWithFriendModule.sig.kt.txt @@ -0,0 +1,30 @@ +// FILE: KotlinInternal.kt + +// CHECK: +// Mangled name: KotlinInternal +// Public signature: /KotlinInternal|null[0] +open class KotlinInternal { + // CHECK: + // Mangled name: KotlinInternal#(){} + // Public signature: /KotlinInternal.|-5645683436151566731[0] + // Public signature debug description: (){} + constructor() /* primary */ + + // CHECK: + // Mangled name: KotlinInternal#foo(){} + // Public signature: /KotlinInternal.foo|-1041209573719867811[0] + // Public signature debug description: foo(){} + internal open fun foo(): Unit + + // CHECK: + // Mangled name: KotlinInternal{}a + // Public signature: /KotlinInternal.a|-1200697420457237799[0] + // Public signature debug description: {}a + internal open val a: Int + // CHECK JVM_IR: + // Mangled name: KotlinInternal#(){}kotlin.Int + // Public signature: /KotlinInternal.a.|4232747788241509192[0] + // Public signature debug description: (){}kotlin.Int + internal open get(): Int + +} diff --git a/compiler/testData/ir/irText/fakeOverrides/visibility/internalWithPublishedApiOverride.ir.txt b/compiler/testData/ir/irText/fakeOverrides/visibility/internalWithPublishedApiOverride.ir.txt new file mode 100644 index 00000000000..892881c247c --- /dev/null +++ b/compiler/testData/ir/irText/fakeOverrides/visibility/internalWithPublishedApiOverride.ir.txt @@ -0,0 +1,34 @@ +FILE fqName: fileName:/KotlinInternalSeparate.kt + CLASS CLASS name:KotlinInternalSeparate modality:OPEN visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.KotlinInternalSeparate + CONSTRUCTOR visibility:public <> () returnType:.KotlinInternalSeparate [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:KotlinInternalSeparate modality:OPEN visibility:public superTypes:[kotlin.Any]' + 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 declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN name:foo visibility:internal modality:OPEN <> ($this:.KotlinInternalSeparate) returnType:kotlin.Unit + annotations: + PublishedApi + $this: VALUE_PARAMETER name: type:.KotlinInternalSeparate + BLOCK_BODY + PROPERTY name:a visibility:internal modality:OPEN [val] + annotations: + PublishedApi + FUN name: visibility:internal modality:OPEN <> ($this:.KotlinInternalSeparate) returnType:kotlin.Int + correspondingProperty: PROPERTY name:a visibility:internal modality:OPEN [val] + $this: VALUE_PARAMETER name: type:.KotlinInternalSeparate + BLOCK_BODY + RETURN type=kotlin.Nothing from='internal open fun (): kotlin.Int declared in .KotlinInternalSeparate' + CONST Int type=kotlin.Int value=1 diff --git a/compiler/testData/ir/irText/fakeOverrides/visibility/internalWithPublishedApiOverride.kt.txt b/compiler/testData/ir/irText/fakeOverrides/visibility/internalWithPublishedApiOverride.kt.txt new file mode 100644 index 00000000000..73d76bd4e6c --- /dev/null +++ b/compiler/testData/ir/irText/fakeOverrides/visibility/internalWithPublishedApiOverride.kt.txt @@ -0,0 +1,20 @@ +// FILE: KotlinInternalSeparate.kt + +open class KotlinInternalSeparate { + constructor() /* primary */ { + super/*Any*/() + /* () */ + + } + + @PublishedApi + internal open fun foo() { + } + + @PublishedApi + internal open val a: Int + internal open get(): Int { + return 1 + } + +} diff --git a/compiler/testData/ir/irText/fakeOverrides/visibility/internalWithPublishedApiOverride.sig.kt.txt b/compiler/testData/ir/irText/fakeOverrides/visibility/internalWithPublishedApiOverride.sig.kt.txt new file mode 100644 index 00000000000..e9ec0042d91 --- /dev/null +++ b/compiler/testData/ir/irText/fakeOverrides/visibility/internalWithPublishedApiOverride.sig.kt.txt @@ -0,0 +1,32 @@ +// FILE: KotlinInternalSeparate.kt + +// CHECK: +// Mangled name: KotlinInternalSeparate +// Public signature: /KotlinInternalSeparate|null[0] +open class KotlinInternalSeparate { + // CHECK: + // Mangled name: KotlinInternalSeparate#(){} + // Public signature: /KotlinInternalSeparate.|-5645683436151566731[0] + // Public signature debug description: (){} + constructor() /* primary */ + + // CHECK: + // Mangled name: KotlinInternalSeparate#foo(){} + // Public signature: /KotlinInternalSeparate.foo|-1041209573719867811[0] + // Public signature debug description: foo(){} + @PublishedApi + internal open fun foo(): Unit + + // CHECK: + // Mangled name: KotlinInternalSeparate{}a + // Public signature: /KotlinInternalSeparate.a|-1200697420457237799[0] + // Public signature debug description: {}a + @PublishedApi + internal open val a: Int + // CHECK JVM_IR: + // Mangled name: KotlinInternalSeparate#(){}kotlin.Int + // Public signature: /KotlinInternalSeparate.a.|4232747788241509192[0] + // Public signature debug description: (){}kotlin.Int + internal open get(): Int + +} diff --git a/compiler/testData/ir/irText/fakeOverrides/void/basicVoidOverride.fir.ir.txt b/compiler/testData/ir/irText/fakeOverrides/void/basicVoidOverride.fir.ir.txt new file mode 100644 index 00000000000..6a9c5ba126b --- /dev/null +++ b/compiler/testData/ir/irText/fakeOverrides/void/basicVoidOverride.fir.ir.txt @@ -0,0 +1,67 @@ +FILE fqName: fileName:/1.kt + CLASS CLASS name:A modality:FINAL visibility:public superTypes:[.Java1] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.A + CONSTRUCTOR visibility:public <> () returnType:.A [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in .Java1' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:A modality:FINAL visibility:public superTypes:[.Java1]' + 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 declared in .Java1 + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:foo visibility:public modality:OPEN <> ($this:.Java1) returnType:@[FlexibleNullability] java.lang.Void? [fake_override] + overridden: + public open fun foo (): @[FlexibleNullability] java.lang.Void? declared in .Java1 + $this: VALUE_PARAMETER name: type:.Java1 + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in .Java1 + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in .Java1 + $this: VALUE_PARAMETER name: type:kotlin.Any + CLASS CLASS name:B modality:FINAL visibility:public superTypes:[.Java1] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.B + CONSTRUCTOR visibility:public <> () returnType:.B [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in .Java1' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:B modality:FINAL visibility:public superTypes:[.Java1]' + 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 declared in .Java1 + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in .Java1 + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in .Java1 + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN name:foo visibility:public modality:OPEN <> ($this:.B) returnType:java.lang.Void + overridden: + public open fun foo (): @[FlexibleNullability] java.lang.Void? declared in .Java1 + $this: VALUE_PARAMETER name: type:.B + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun foo (): java.lang.Void declared in .B' + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=java.lang.Void origin=EXCLEXCL + : kotlin.Nothing + arg0: CONST Null type=kotlin.Nothing? value=null + FUN name:test visibility:public modality:FINAL <> () returnType:kotlin.Unit + BLOCK_BODY + VAR name:k type:java.lang.Void? [val] + CALL 'public open fun foo (): @[FlexibleNullability] java.lang.Void? declared in .A' type=@[FlexibleNullability] java.lang.Void? origin=null + $this: CONSTRUCTOR_CALL 'public constructor () declared in .A' type=.A origin=null + VAR name:k2 type:kotlin.Any [val] + TYPE_OP type=java.lang.Void origin=IMPLICIT_NOTNULL typeOperand=java.lang.Void + CALL 'public open fun foo (): @[FlexibleNullability] java.lang.Void? declared in .A' type=@[FlexibleNullability] java.lang.Void? origin=null + $this: CONSTRUCTOR_CALL 'public constructor () declared in .A' type=.A origin=null + VAR name:k3 type:java.lang.Void [val] + CALL 'public open fun foo (): java.lang.Void declared in .B' type=java.lang.Void origin=null + $this: CONSTRUCTOR_CALL 'public constructor () declared in .B' type=.B origin=null + VAR name:k4 type:kotlin.Any [val] + CALL 'public open fun foo (): java.lang.Void declared in .B' type=java.lang.Void origin=null + $this: CONSTRUCTOR_CALL 'public constructor () declared in .B' type=.B origin=null diff --git a/compiler/testData/ir/irText/fakeOverrides/void/basicVoidOverride.fir.kt.txt b/compiler/testData/ir/irText/fakeOverrides/void/basicVoidOverride.fir.kt.txt new file mode 100644 index 00000000000..f482e0b0cbd --- /dev/null +++ b/compiler/testData/ir/irText/fakeOverrides/void/basicVoidOverride.fir.kt.txt @@ -0,0 +1,28 @@ +class A : Java1 { + constructor() /* primary */ { + super/*Java1*/() + /* () */ + + } + +} + +class B : Java1 { + constructor() /* primary */ { + super/*Java1*/() + /* () */ + + } + + override fun foo(): Void { + return CHECK_NOT_NULL(arg0 = null) + } + +} + +fun test() { + val k: Void? = A().foo() + val k2: Any = A().foo() /*!! Void */ + val k3: Void = B().foo() + val k4: Any = B().foo() +} diff --git a/compiler/testData/ir/irText/fakeOverrides/void/basicVoidOverride.kt b/compiler/testData/ir/irText/fakeOverrides/void/basicVoidOverride.kt index 950707caa0c..9fca26f06e3 100644 --- a/compiler/testData/ir/irText/fakeOverrides/void/basicVoidOverride.kt +++ b/compiler/testData/ir/irText/fakeOverrides/void/basicVoidOverride.kt @@ -1,4 +1,3 @@ -// FIR_IDENTICAL // TARGET_BACKEND: JVM // FILE: Java1.java diff --git a/compiler/testData/ir/irText/fakeOverrides/void/intersectionVoidOverride.fir.ir.txt b/compiler/testData/ir/irText/fakeOverrides/void/intersectionVoidOverride.fir.ir.txt new file mode 100644 index 00000000000..dfd1c5a6d70 --- /dev/null +++ b/compiler/testData/ir/irText/fakeOverrides/void/intersectionVoidOverride.fir.ir.txt @@ -0,0 +1,73 @@ +FILE fqName: fileName:/1.kt + CLASS CLASS name:C modality:FINAL visibility:public superTypes:[.Java1; .Java2] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.C + CONSTRUCTOR visibility:public <> () returnType:.C [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in .Java1' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:C modality:FINAL visibility:public superTypes:[.Java1; .Java2]' + 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 declared in .Java1 + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Java2 + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:foo visibility:public modality:OPEN <> ($this:.Java1) returnType:@[FlexibleNullability] java.lang.Void? [fake_override] + overridden: + public open fun foo (): @[FlexibleNullability] java.lang.Void? declared in .Java1 + public abstract fun foo (): @[FlexibleNullability] kotlin.Any? declared in .Java2 + $this: VALUE_PARAMETER name: type:.Java1 + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in .Java1 + public open fun hashCode (): kotlin.Int declared in .Java2 + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in .Java1 + public open fun toString (): kotlin.String declared in .Java2 + $this: VALUE_PARAMETER name: type:kotlin.Any + CLASS CLASS name:D modality:FINAL visibility:public superTypes:[.Java1; .Java2] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.D + CONSTRUCTOR visibility:public <> () returnType:.D [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in .Java1' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:D modality:FINAL visibility:public superTypes:[.Java1; .Java2]' + 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 declared in .Java1 + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .Java2 + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in .Java1 + public open fun hashCode (): kotlin.Int declared in .Java2 + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in .Java1 + public open fun toString (): kotlin.String declared in .Java2 + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN name:foo visibility:public modality:OPEN <> ($this:.D) returnType:java.lang.Void + overridden: + public open fun foo (): @[FlexibleNullability] java.lang.Void? declared in .Java1 + public abstract fun foo (): @[FlexibleNullability] kotlin.Any? declared in .Java2 + $this: VALUE_PARAMETER name: type:.D + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun foo (): java.lang.Void declared in .D' + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=java.lang.Void origin=EXCLEXCL + : kotlin.Nothing + arg0: CONST Null type=kotlin.Nothing? value=null + FUN name:test visibility:public modality:FINAL <> () returnType:kotlin.Unit + BLOCK_BODY + VAR name:k1 type:kotlin.Any [val] + TYPE_OP type=java.lang.Void origin=IMPLICIT_NOTNULL typeOperand=java.lang.Void + CALL 'public open fun foo (): @[FlexibleNullability] java.lang.Void? declared in .C' type=@[FlexibleNullability] java.lang.Void? origin=null + $this: CONSTRUCTOR_CALL 'public constructor () declared in .C' type=.C origin=null + VAR name:k2 type:java.lang.Void [val] + TYPE_OP type=java.lang.Void origin=IMPLICIT_NOTNULL typeOperand=java.lang.Void + CALL 'public open fun foo (): @[FlexibleNullability] java.lang.Void? declared in .C' type=@[FlexibleNullability] java.lang.Void? origin=null + $this: CONSTRUCTOR_CALL 'public constructor () declared in .C' type=.C origin=null + VAR name:k3 type:java.lang.Void [val] + CALL 'public open fun foo (): java.lang.Void declared in .D' type=java.lang.Void origin=null + $this: CONSTRUCTOR_CALL 'public constructor () declared in .D' type=.D origin=null diff --git a/compiler/testData/ir/irText/fakeOverrides/void/intersectionVoidOverride.fir.kt.txt b/compiler/testData/ir/irText/fakeOverrides/void/intersectionVoidOverride.fir.kt.txt new file mode 100644 index 00000000000..005231216ac --- /dev/null +++ b/compiler/testData/ir/irText/fakeOverrides/void/intersectionVoidOverride.fir.kt.txt @@ -0,0 +1,27 @@ +class C : Java1, Java2 { + constructor() /* primary */ { + super/*Java1*/() + /* () */ + + } + +} + +class D : Java1, Java2 { + constructor() /* primary */ { + super/*Java1*/() + /* () */ + + } + + override fun foo(): Void { + return CHECK_NOT_NULL(arg0 = null) + } + +} + +fun test() { + val k1: Any = C().foo() /*!! Void */ + val k2: Void = C().foo() /*!! Void */ + val k3: Void = D().foo() +} diff --git a/compiler/testData/ir/irText/fakeOverrides/void/intersectionVoidOverride.kt b/compiler/testData/ir/irText/fakeOverrides/void/intersectionVoidOverride.kt index 07a185a0671..a826b8833ee 100644 --- a/compiler/testData/ir/irText/fakeOverrides/void/intersectionVoidOverride.kt +++ b/compiler/testData/ir/irText/fakeOverrides/void/intersectionVoidOverride.kt @@ -1,4 +1,3 @@ -// FIR_IDENTICAL // TARGET_BACKEND: JVM // FILE: Java1.java diff --git a/compiler/testData/ir/irText/firProblems/functionLiteralGenericSignature.fir.ir.txt b/compiler/testData/ir/irText/firProblems/functionLiteralGenericSignature.fir.ir.txt new file mode 100644 index 00000000000..ad80c4015b1 --- /dev/null +++ b/compiler/testData/ir/irText/firProblems/functionLiteralGenericSignature.fir.ir.txt @@ -0,0 +1,110 @@ +FILE fqName: fileName:/functionLiteralGenericSignature.kt + PROPERTY name:unitFun visibility:public modality:FINAL [val] + FIELD PROPERTY_BACKING_FIELD name:unitFun type:kotlin.Function0 visibility:private [final,static] + EXPRESSION_BODY + FUN_EXPR type=kotlin.Function0 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Unit + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.Unit declared in .unitFun' + GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Function0 + correspondingProperty: PROPERTY name:unitFun visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): kotlin.Function0 declared in ' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:unitFun type:kotlin.Function0 visibility:private [final,static]' type=kotlin.Function0 origin=null + PROPERTY name:intFun visibility:public modality:FINAL [val] + FIELD PROPERTY_BACKING_FIELD name:intFun type:kotlin.Function0 visibility:private [final,static] + EXPRESSION_BODY + FUN_EXPR type=kotlin.Function0 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Int + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.Int declared in .intFun' + CONST Int type=kotlin.Int value=42 + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Function0 + correspondingProperty: PROPERTY name:intFun visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): kotlin.Function0 declared in ' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:intFun type:kotlin.Function0 visibility:private [final,static]' type=kotlin.Function0 origin=null + PROPERTY name:stringParamFun visibility:public modality:FINAL [val] + FIELD PROPERTY_BACKING_FIELD name:stringParamFun type:kotlin.Function1 visibility:private [final,static] + EXPRESSION_BODY + FUN_EXPR type=kotlin.Function1 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (x:kotlin.String) returnType:kotlin.Unit + VALUE_PARAMETER name:x index:0 type:kotlin.String + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (x: kotlin.String): kotlin.Unit declared in .stringParamFun' + GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Function1 + correspondingProperty: PROPERTY name:stringParamFun visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): kotlin.Function1 declared in ' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:stringParamFun type:kotlin.Function1 visibility:private [final,static]' type=kotlin.Function1 origin=null + PROPERTY name:listFun visibility:public modality:FINAL [val] + FIELD PROPERTY_BACKING_FIELD name:listFun type:kotlin.Function1, kotlin.collections.List> visibility:private [final,static] + EXPRESSION_BODY + FUN_EXPR type=kotlin.Function1, kotlin.collections.List> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (l:kotlin.collections.List) returnType:kotlin.collections.List + VALUE_PARAMETER name:l index:0 type:kotlin.collections.List + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (l: kotlin.collections.List): kotlin.collections.List declared in .listFun' + GET_VAR 'l: kotlin.collections.List declared in .listFun.' type=kotlin.collections.List origin=null + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Function1, kotlin.collections.List> + correspondingProperty: PROPERTY name:listFun visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): kotlin.Function1, kotlin.collections.List> declared in ' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:listFun type:kotlin.Function1, kotlin.collections.List> visibility:private [final,static]' type=kotlin.Function1, kotlin.collections.List> origin=null + PROPERTY name:mutableListFun visibility:public modality:FINAL [val] + FIELD PROPERTY_BACKING_FIELD name:mutableListFun type:kotlin.Function1, kotlin.collections.MutableList> visibility:private [final,static] + EXPRESSION_BODY + FUN_EXPR type=kotlin.Function1, kotlin.collections.MutableList> origin=ANONYMOUS_FUNCTION + FUN LOCAL_FUNCTION name: visibility:local modality:FINAL <> (l:kotlin.collections.MutableList) returnType:kotlin.collections.MutableList + VALUE_PARAMETER name:l index:0 type:kotlin.collections.MutableList + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (l: kotlin.collections.MutableList): kotlin.collections.MutableList declared in .mutableListFun' + CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.collections.MutableList origin=EXCLEXCL + : kotlin.Nothing + arg0: CONST Null type=kotlin.Nothing? value=null + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Function1, kotlin.collections.MutableList> + correspondingProperty: PROPERTY name:mutableListFun visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): kotlin.Function1, kotlin.collections.MutableList> declared in ' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:mutableListFun type:kotlin.Function1, kotlin.collections.MutableList> visibility:private [final,static]' type=kotlin.Function1, kotlin.collections.MutableList> origin=null + PROPERTY name:funWithIn visibility:public modality:FINAL [val] + FIELD PROPERTY_BACKING_FIELD name:funWithIn type:kotlin.Function1, kotlin.Unit> visibility:private [final,static] + EXPRESSION_BODY + FUN_EXPR type=kotlin.Function1, kotlin.Unit> origin=ANONYMOUS_FUNCTION + FUN LOCAL_FUNCTION name: visibility:local modality:FINAL <> (x:kotlin.Comparable) returnType:kotlin.Unit + VALUE_PARAMETER name:x index:0 type:kotlin.Comparable + BLOCK_BODY + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Function1, kotlin.Unit> + correspondingProperty: PROPERTY name:funWithIn visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): kotlin.Function1, kotlin.Unit> declared in ' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:funWithIn type:kotlin.Function1, kotlin.Unit> visibility:private [final,static]' type=kotlin.Function1, kotlin.Unit> origin=null + PROPERTY name:extensionFun visibility:public modality:FINAL [val] + FIELD PROPERTY_BACKING_FIELD name:extensionFun type:@[ExtensionFunctionType] kotlin.Function1 visibility:private [final,static] + EXPRESSION_BODY + FUN_EXPR type=@[ExtensionFunctionType] kotlin.Function1 origin=ANONYMOUS_FUNCTION + FUN LOCAL_FUNCTION name: visibility:local modality:FINAL <> ($receiver:kotlin.Any) returnType:kotlin.Unit + $receiver: VALUE_PARAMETER name: type:kotlin.Any + BLOCK_BODY + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:@[ExtensionFunctionType] kotlin.Function1 + correspondingProperty: PROPERTY name:extensionFun visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): @[ExtensionFunctionType] kotlin.Function1 declared in ' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:extensionFun type:@[ExtensionFunctionType] kotlin.Function1 visibility:private [final,static]' type=@[ExtensionFunctionType] kotlin.Function1 origin=null + PROPERTY name:extensionWithArgFun visibility:public modality:FINAL [val] + FIELD PROPERTY_BACKING_FIELD name:extensionWithArgFun type:@[ExtensionFunctionType] kotlin.Function2 visibility:private [final,static] + EXPRESSION_BODY + FUN_EXPR type=@[ExtensionFunctionType] kotlin.Function2 origin=ANONYMOUS_FUNCTION + FUN LOCAL_FUNCTION name: visibility:local modality:FINAL <> ($receiver:kotlin.Long, x:kotlin.Any) returnType:java.util.Date + $receiver: VALUE_PARAMETER name: type:kotlin.Long + VALUE_PARAMETER name:x index:0 type:kotlin.Any + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (x: kotlin.Any): java.util.Date declared in .extensionWithArgFun' + CONSTRUCTOR_CALL 'public constructor () declared in java.util.Date' type=java.util.Date origin=null + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:@[ExtensionFunctionType] kotlin.Function2 + correspondingProperty: PROPERTY name:extensionWithArgFun visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): @[ExtensionFunctionType] kotlin.Function2 declared in ' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:extensionWithArgFun type:@[ExtensionFunctionType] kotlin.Function2 visibility:private [final,static]' type=@[ExtensionFunctionType] kotlin.Function2 origin=null diff --git a/compiler/testData/ir/irText/firProblems/functionLiteralGenericSignature.fir.kt.txt b/compiler/testData/ir/irText/firProblems/functionLiteralGenericSignature.fir.kt.txt new file mode 100644 index 00000000000..aa648f6b93f --- /dev/null +++ b/compiler/testData/ir/irText/firProblems/functionLiteralGenericSignature.fir.kt.txt @@ -0,0 +1,53 @@ +val unitFun: Function0 + field = local fun () { + return Unit + } + + get + +val intFun: Function0 + field = local fun (): Int { + return 42 + } + + get + +val stringParamFun: Function1 + field = local fun (x: String) { + return Unit + } + + get + +val listFun: Function1, List> + field = local fun (l: List): List { + return l + } + + get + +val mutableListFun: Function1, MutableList> + field = local fun (l: MutableList): MutableList { + return CHECK_NOT_NULL(arg0 = null) + } + + get + +val funWithIn: Function1, Unit> + field = local fun (x: Comparable) { + } + + get + +val extensionFun: @ExtensionFunctionType Function1 + field = local fun Any.() { + } + + get + +val extensionWithArgFun: @ExtensionFunctionType Function2 + field = local fun Long.(x: Any): Date { + return Date() + } + + get diff --git a/compiler/testData/ir/irText/firProblems/functionLiteralGenericSignature.kt b/compiler/testData/ir/irText/firProblems/functionLiteralGenericSignature.kt index 59e8cb47984..04e86a0e2a8 100644 --- a/compiler/testData/ir/irText/firProblems/functionLiteralGenericSignature.kt +++ b/compiler/testData/ir/irText/firProblems/functionLiteralGenericSignature.kt @@ -1,5 +1,4 @@ // SKIP_KLIB_TEST -// FIR_IDENTICAL // TARGET_BACKEND: JVM_IR import java.util.Date diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java index 57f51342fb1..6396b5c1b54 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java @@ -16652,6 +16652,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { runTest("compiler/testData/diagnostics/tests/inference/capturedTypesInSelfType.kt"); } + @Test + @TestMetadata("checkNotNullWithNullableExpectedType.kt") + public void testCheckNotNullWithNullableExpectedType() { + runTest("compiler/testData/diagnostics/tests/inference/checkNotNullWithNullableExpectedType.kt"); + } + @Test @TestMetadata("coerceFunctionLiteralToSuspend.kt") public void testCoerceFunctionLiteralToSuspend() { @@ -17174,6 +17180,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { runTest("compiler/testData/diagnostics/tests/inference/mostSpecificAfterInference.kt"); } + @Test + @TestMetadata("nestedIfWithExpectedType.kt") + public void testNestedIfWithExpectedType() { + runTest("compiler/testData/diagnostics/tests/inference/nestedIfWithExpectedType.kt"); + } + @Test @TestMetadata("NoInferenceFromDeclaredBounds.kt") public void testNoInferenceFromDeclaredBounds() { @@ -18982,6 +18994,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { public void testWrongApproximationWithDefNotNullTypesAndDelegates() { runTest("compiler/testData/diagnostics/tests/inference/constraints/wrongApproximationWithDefNotNullTypesAndDelegates.kt"); } + + @Test + @TestMetadata("wrongExpectedTypeForWhen.kt") + public void testWrongExpectedTypeForWhen() { + runTest("compiler/testData/diagnostics/tests/inference/constraints/wrongExpectedTypeForWhen.kt"); + } } @Nested diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/JvmAbiConsistencyTestBoxGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/JvmAbiConsistencyTestBoxGenerated.java index 489e0980ec4..cda0a97f964 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/JvmAbiConsistencyTestBoxGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/JvmAbiConsistencyTestBoxGenerated.java @@ -23817,6 +23817,12 @@ public class JvmAbiConsistencyTestBoxGenerated extends AbstractJvmAbiConsistency runTest("compiler/testData/codegen/box/inference/kt51040.kt"); } + @Test + @TestMetadata("kt65882.kt") + public void testKt65882() { + runTest("compiler/testData/codegen/box/inference/kt65882.kt"); + } + @Test @TestMetadata("lambdaWithStarReturn.kt") public void testLambdaWithStarReturn() { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java index 5124a8ad583..9dfbe9f95a9 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java @@ -22593,6 +22593,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/inference/kt51040.kt"); } + @Test + @TestMetadata("kt65882.kt") + public void testKt65882() { + runTest("compiler/testData/codegen/box/inference/kt65882.kt"); + } + @Test @TestMetadata("lambdaWithStarReturn.kt") public void testLambdaWithStarReturn() { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java index 4b10a3b954c..7ed07589daa 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java @@ -23817,6 +23817,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/inference/kt51040.kt"); } + @Test + @TestMetadata("kt65882.kt") + public void testKt65882() { + runTest("compiler/testData/codegen/box/inference/kt65882.kt"); + } + @Test @TestMetadata("lambdaWithStarReturn.kt") public void testLambdaWithStarReturn() { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java index 44ab1419134..3ab3945b41f 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java @@ -23817,6 +23817,12 @@ public class IrBlackBoxCodegenWithIrInlinerTestGenerated extends AbstractIrBlack runTest("compiler/testData/codegen/box/inference/kt51040.kt"); } + @Test + @TestMetadata("kt65882.kt") + public void testKt65882() { + runTest("compiler/testData/codegen/box/inference/kt65882.kt"); + } + @Test @TestMetadata("lambdaWithStarReturn.kt") public void testLambdaWithStarReturn() { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/inlineScopes/FirBlackBoxCodegenTestWithInlineScopesGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/inlineScopes/FirBlackBoxCodegenTestWithInlineScopesGenerated.java index ada391ed73e..2101ea7bad6 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/inlineScopes/FirBlackBoxCodegenTestWithInlineScopesGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/inlineScopes/FirBlackBoxCodegenTestWithInlineScopesGenerated.java @@ -23817,6 +23817,12 @@ public class FirBlackBoxCodegenTestWithInlineScopesGenerated extends AbstractFir runTest("compiler/testData/codegen/box/inference/kt51040.kt"); } + @Test + @TestMetadata("kt65882.kt") + public void testKt65882() { + runTest("compiler/testData/codegen/box/inference/kt65882.kt"); + } + @Test @TestMetadata("lambdaWithStarReturn.kt") public void testLambdaWithStarReturn() { diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java index 26228de365b..6ac0bf048fa 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -19956,6 +19956,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/inference/kt51040.kt"); } + @TestMetadata("kt65882.kt") + public void testKt65882() { + runTest("compiler/testData/codegen/box/inference/kt65882.kt"); + } + @TestMetadata("lambdaWithStarReturn.kt") public void testLambdaWithStarReturn() { runTest("compiler/testData/codegen/box/inference/lambdaWithStarReturn.kt"); diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/try-expression/p-8/neg/1.1.fir.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/try-expression/p-8/neg/1.1.fir.kt index e7649d225b5..d1d5ab118dc 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/try-expression/p-8/neg/1.1.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/try-expression/p-8/neg/1.1.fir.kt @@ -28,7 +28,7 @@ class B(data: T) : A(data) fun case1() { val tryVal: B = - try { + try { throwExceptionA(false) A("") } catch (e: Exception) { @@ -55,7 +55,7 @@ class B(data: T) : A(data) fun case2() { val tryVal: A = - try { + try { throwExceptionA(false) A("") } catch (e: Exception) { @@ -79,7 +79,7 @@ class B(data: T) : A(data) fun case3() { val tryVal: A = - try { + try { throwExceptionA(false) A(2) } catch (e: ExcA) { diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/2.fir.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/2.fir.kt index f1a41534f51..35877acb701 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/2.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/2.fir.kt @@ -490,7 +490,7 @@ fun case_17(a: Int?, b: Int = if (a != null) if (false || a != null || false) a else 0) { +fun case_18(a: Int?, b: Int = if (false || a != null || false) a else 0) { a b b.equals(null) diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/6.fir.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/6.fir.kt index e1eba841726..2b290de297e 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/6.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/6.fir.kt @@ -685,7 +685,7 @@ fun case_33(a: ((Float) -> Int?)?, b: Float?, c: Boolean?) { fun case_34(z1: Boolean?) { var z = null - if (true && true && true && true && EnumClassWithNullableProperty.A.prop_1 != implicitNullableNothingProperty && EnumClassWithNullableProperty.A.prop_1 !== null && EnumClassWithNullableProperty.A.prop_1 !== z || z1 != implicitNullableNothingProperty || z1!! && true && true) { + if (true && true && true && true && EnumClassWithNullableProperty.A.prop_1 != implicitNullableNothingProperty && EnumClassWithNullableProperty.A.prop_1 !== null && EnumClassWithNullableProperty.A.prop_1 !== z || z1 != implicitNullableNothingProperty || z1!! && true && true) { } else { EnumClassWithNullableProperty.A.prop_1 diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java index 5ac92aca400..7c803dea786 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java @@ -18075,6 +18075,12 @@ public class FirJsCodegenBoxTestGenerated extends AbstractFirJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inference/kt49838.kt"); } + @Test + @TestMetadata("kt65882.kt") + public void testKt65882() { + runTest("compiler/testData/codegen/box/inference/kt65882.kt"); + } + @Test @TestMetadata("lambdaWithStarReturn.kt") public void testLambdaWithStarReturn() { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsES6CodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsES6CodegenBoxTestGenerated.java index b98148d8923..c6b3eb8e7a0 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsES6CodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsES6CodegenBoxTestGenerated.java @@ -18075,6 +18075,12 @@ public class FirJsES6CodegenBoxTestGenerated extends AbstractFirJsES6CodegenBoxT runTest("compiler/testData/codegen/box/inference/kt49838.kt"); } + @Test + @TestMetadata("kt65882.kt") + public void testKt65882() { + runTest("compiler/testData/codegen/box/inference/kt65882.kt"); + } + @Test @TestMetadata("lambdaWithStarReturn.kt") public void testLambdaWithStarReturn() { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java index dd4cdbfd3ff..d269ca8bfc7 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java @@ -18075,6 +18075,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inference/kt49838.kt"); } + @Test + @TestMetadata("kt65882.kt") + public void testKt65882() { + runTest("compiler/testData/codegen/box/inference/kt65882.kt"); + } + @Test @TestMetadata("lambdaWithStarReturn.kt") public void testLambdaWithStarReturn() { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java index fa0c124cdf3..a40ca213201 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java @@ -18075,6 +18075,12 @@ public class IrJsES6CodegenBoxTestGenerated extends AbstractIrJsES6CodegenBoxTes runTest("compiler/testData/codegen/box/inference/kt49838.kt"); } + @Test + @TestMetadata("kt65882.kt") + public void testKt65882() { + runTest("compiler/testData/codegen/box/inference/kt65882.kt"); + } + @Test @TestMetadata("lambdaWithStarReturn.kt") public void testLambdaWithStarReturn() { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestGenerated.java index 6a74ed43459..35b5c1d777f 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestGenerated.java @@ -19358,6 +19358,12 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe runTest("compiler/testData/codegen/box/inference/kt49838.kt"); } + @Test + @TestMetadata("kt65882.kt") + public void testKt65882() { + runTest("compiler/testData/codegen/box/inference/kt65882.kt"); + } + @Test @TestMetadata("lambdaWithStarReturn.kt") public void testLambdaWithStarReturn() { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestNoPLGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestNoPLGenerated.java index e58906d824a..a5f6588149c 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestNoPLGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestNoPLGenerated.java @@ -19780,6 +19780,12 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB runTest("compiler/testData/codegen/box/inference/kt49838.kt"); } + @Test + @TestMetadata("kt65882.kt") + public void testKt65882() { + runTest("compiler/testData/codegen/box/inference/kt65882.kt"); + } + @Test @TestMetadata("lambdaWithStarReturn.kt") public void testLambdaWithStarReturn() { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestGenerated.java index 916c0e13066..a18667ab273 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestGenerated.java @@ -18936,6 +18936,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest runTest("compiler/testData/codegen/box/inference/kt49838.kt"); } + @Test + @TestMetadata("kt65882.kt") + public void testKt65882() { + runTest("compiler/testData/codegen/box/inference/kt65882.kt"); + } + @Test @TestMetadata("lambdaWithStarReturn.kt") public void testLambdaWithStarReturn() { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestNoPLGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestNoPLGenerated.java index 8288223f37f..a871d944ec1 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestNoPLGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestNoPLGenerated.java @@ -19359,6 +19359,12 @@ public class NativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenBoxT runTest("compiler/testData/codegen/box/inference/kt49838.kt"); } + @Test + @TestMetadata("kt65882.kt") + public void testKt65882() { + runTest("compiler/testData/codegen/box/inference/kt65882.kt"); + } + @Test @TestMetadata("lambdaWithStarReturn.kt") public void testLambdaWithStarReturn() { diff --git a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmJsCodegenBoxTestGenerated.java b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmJsCodegenBoxTestGenerated.java index 7f37cbb425c..7463cd070fc 100644 --- a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmJsCodegenBoxTestGenerated.java +++ b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmJsCodegenBoxTestGenerated.java @@ -18117,6 +18117,12 @@ public class FirWasmJsCodegenBoxTestGenerated extends AbstractFirWasmJsCodegenBo runTest("compiler/testData/codegen/box/inference/kt49838.kt"); } + @Test + @TestMetadata("kt65882.kt") + public void testKt65882() { + runTest("compiler/testData/codegen/box/inference/kt65882.kt"); + } + @Test @TestMetadata("lambdaWithStarReturn.kt") public void testLambdaWithStarReturn() { diff --git a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxTestGenerated.java b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxTestGenerated.java index 843e2fa4bc8..caff54727af 100644 --- a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxTestGenerated.java +++ b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxTestGenerated.java @@ -18117,6 +18117,12 @@ public class K1WasmCodegenBoxTestGenerated extends AbstractK1WasmCodegenBoxTest runTest("compiler/testData/codegen/box/inference/kt49838.kt"); } + @Test + @TestMetadata("kt65882.kt") + public void testKt65882() { + runTest("compiler/testData/codegen/box/inference/kt65882.kt"); + } + @Test @TestMetadata("lambdaWithStarReturn.kt") public void testLambdaWithStarReturn() {