diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosisCompilerTestFE10TestdataTestGenerated.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosisCompilerTestFE10TestdataTestGenerated.java index 3c99d379ac2..72b3bd3d98e 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosisCompilerTestFE10TestdataTestGenerated.java +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosisCompilerTestFE10TestdataTestGenerated.java @@ -13492,12 +13492,6 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag runTest("compiler/testData/diagnostics/tests/inference/commonSuperTypeOfTypesWithErrorSupertypes.kt"); } - @Test - @TestMetadata("compatibilityResolveWhenVariableHasComplexIntersectionType.kt") - public void testCompatibilityResolveWhenVariableHasComplexIntersectionType() throws Exception { - runTest("compiler/testData/diagnostics/tests/inference/compatibilityResolveWhenVariableHasComplexIntersectionType.kt"); - } - @Test @TestMetadata("completeInferenceIfManyFailed.kt") public void testCompleteInferenceIfManyFailed() throws Exception { @@ -13834,36 +13828,6 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag runTest("compiler/testData/diagnostics/tests/inference/kt40396.kt"); } - @Test - @TestMetadata("kt45461.kt") - public void testKt45461() throws Exception { - runTest("compiler/testData/diagnostics/tests/inference/kt45461.kt"); - } - - @Test - @TestMetadata("kt45461_2.kt") - public void testKt45461_2() throws Exception { - runTest("compiler/testData/diagnostics/tests/inference/kt45461_2.kt"); - } - - @Test - @TestMetadata("kt45461_3.kt") - public void testKt45461_3() throws Exception { - runTest("compiler/testData/diagnostics/tests/inference/kt45461_3.kt"); - } - - @Test - @TestMetadata("kt45461_4.kt") - public void testKt45461_4() throws Exception { - runTest("compiler/testData/diagnostics/tests/inference/kt45461_4.kt"); - } - - @Test - @TestMetadata("kt45461_5.kt") - public void testKt45461_5() throws Exception { - runTest("compiler/testData/diagnostics/tests/inference/kt45461_5.kt"); - } - @Test @TestMetadata("kt46515.kt") public void testKt46515() throws Exception { @@ -13876,36 +13840,6 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag runTest("compiler/testData/diagnostics/tests/inference/kt47316.kt"); } - @Test - @TestMetadata("kt48765.kt") - public void testKt48765() throws Exception { - runTest("compiler/testData/diagnostics/tests/inference/kt48765.kt"); - } - - @Test - @TestMetadata("kt48935.kt") - public void testKt48935() throws Exception { - runTest("compiler/testData/diagnostics/tests/inference/kt48935.kt"); - } - - @Test - @TestMetadata("kt48935_2.kt") - public void testKt48935_2() throws Exception { - runTest("compiler/testData/diagnostics/tests/inference/kt48935_2.kt"); - } - - @Test - @TestMetadata("kt48935_3.kt") - public void testKt48935_3() throws Exception { - runTest("compiler/testData/diagnostics/tests/inference/kt48935_3.kt"); - } - - @Test - @TestMetadata("kt48935_4.kt") - public void testKt48935_4() throws Exception { - runTest("compiler/testData/diagnostics/tests/inference/kt48935_4.kt"); - } - @Test @TestMetadata("kt49658.kt") public void testKt49658() throws Exception { @@ -13918,12 +13852,6 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag runTest("compiler/testData/diagnostics/tests/inference/kt49658Strict.kt"); } - @Test - @TestMetadata("kt49661.kt") - public void testKt49661() throws Exception { - runTest("compiler/testData/diagnostics/tests/inference/kt49661.kt"); - } - @Test @TestMetadata("kt6175.kt") public void testKt6175() throws Exception { @@ -14901,12 +14829,6 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag runTest("compiler/testData/diagnostics/tests/inference/commonSystem/postponedCompletionWithExactAnnotation_ni.kt"); } - @Test - @TestMetadata("selectFromCovariantAndContravariantTypes.kt") - public void testSelectFromCovariantAndContravariantTypes() throws Exception { - runTest("compiler/testData/diagnostics/tests/inference/commonSystem/selectFromCovariantAndContravariantTypes.kt"); - } - @Test @TestMetadata("selectFromTwoIncompatibleTypes.kt") public void testSelectFromTwoIncompatibleTypes() throws Exception { @@ -15280,6 +15202,304 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag } } + @Nested + @TestMetadata("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes") + @TestDataPath("$PROJECT_ROOT") + public class EmptyIntersectionTypes { + @Test + public void testAllFilesPresentInEmptyIntersectionTypes() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + } + + @Test + @TestMetadata("compatibilityResolveWhenVariableHasComplexIntersectionType.kt") + public void testCompatibilityResolveWhenVariableHasComplexIntersectionType() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/compatibilityResolveWhenVariableHasComplexIntersectionType.kt"); + } + + @Test + @TestMetadata("kt45461.kt") + public void testKt45461() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461.kt"); + } + + @Test + @TestMetadata("kt45461_10.kt") + public void testKt45461_10() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_10.kt"); + } + + @Test + @TestMetadata("kt45461_11.kt") + public void testKt45461_11() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_11.kt"); + } + + @Test + @TestMetadata("kt45461_12.kt") + public void testKt45461_12() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_12.kt"); + } + + @Test + @TestMetadata("kt45461_13.kt") + public void testKt45461_13() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_13.kt"); + } + + @Test + @TestMetadata("kt45461_14.kt") + public void testKt45461_14() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_14.kt"); + } + + @Test + @TestMetadata("kt45461_15.kt") + public void testKt45461_15() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_15.kt"); + } + + @Test + @TestMetadata("kt45461_16.kt") + public void testKt45461_16() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_16.kt"); + } + + @Test + @TestMetadata("kt45461_17.kt") + public void testKt45461_17() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_17.kt"); + } + + @Test + @TestMetadata("kt45461_18.kt") + public void testKt45461_18() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_18.kt"); + } + + @Test + @TestMetadata("kt45461_19.kt") + public void testKt45461_19() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_19.kt"); + } + + @Test + @TestMetadata("kt45461_2.kt") + public void testKt45461_2() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_2.kt"); + } + + @Test + @TestMetadata("kt45461_20.kt") + public void testKt45461_20() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_20.kt"); + } + + @Test + @TestMetadata("kt45461_21.kt") + public void testKt45461_21() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_21.kt"); + } + + @Test + @TestMetadata("kt45461_22.kt") + public void testKt45461_22() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_22.kt"); + } + + @Test + @TestMetadata("kt45461_23.kt") + public void testKt45461_23() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_23.kt"); + } + + @Test + @TestMetadata("kt45461_24.kt") + public void testKt45461_24() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_24.kt"); + } + + @Test + @TestMetadata("kt45461_25.kt") + public void testKt45461_25() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_25.kt"); + } + + @Test + @TestMetadata("kt45461_26.kt") + public void testKt45461_26() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_26.kt"); + } + + @Test + @TestMetadata("kt45461_27.kt") + public void testKt45461_27() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_27.kt"); + } + + @Test + @TestMetadata("kt45461_28.kt") + public void testKt45461_28() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_28.kt"); + } + + @Test + @TestMetadata("kt45461_29.kt") + public void testKt45461_29() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_29.kt"); + } + + @Test + @TestMetadata("kt45461_3.kt") + public void testKt45461_3() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_3.kt"); + } + + @Test + @TestMetadata("kt45461_30.kt") + public void testKt45461_30() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_30.kt"); + } + + @Test + @TestMetadata("kt45461_31.kt") + public void testKt45461_31() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_31.kt"); + } + + @Test + @TestMetadata("kt45461_32.kt") + public void testKt45461_32() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_32.kt"); + } + + @Test + @TestMetadata("kt45461_33.kt") + public void testKt45461_33() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_33.kt"); + } + + @Test + @TestMetadata("kt45461_34.kt") + public void testKt45461_34() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_34.kt"); + } + + @Test + @TestMetadata("kt45461_35.kt") + public void testKt45461_35() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_35.kt"); + } + + @Test + @TestMetadata("kt45461_35_Enabled.kt") + public void testKt45461_35_Enabled() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_35_Enabled.kt"); + } + + @Test + @TestMetadata("kt45461_4.kt") + public void testKt45461_4() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_4.kt"); + } + + @Test + @TestMetadata("kt45461_5.kt") + public void testKt45461_5() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_5.kt"); + } + + @Test + @TestMetadata("kt45461_6.kt") + public void testKt45461_6() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_6.kt"); + } + + @Test + @TestMetadata("kt45461_7.kt") + public void testKt45461_7() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_7.kt"); + } + + @Test + @TestMetadata("kt45461_8.kt") + public void testKt45461_8() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_8.kt"); + } + + @Test + @TestMetadata("kt45461_9.kt") + public void testKt45461_9() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_9.kt"); + } + + @Test + @TestMetadata("kt48765.kt") + public void testKt48765() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt48765.kt"); + } + + @Test + @TestMetadata("kt48935.kt") + public void testKt48935() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt48935.kt"); + } + + @Test + @TestMetadata("kt48935_2.kt") + public void testKt48935_2() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt48935_2.kt"); + } + + @Test + @TestMetadata("kt48935_3.kt") + public void testKt48935_3() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt48935_3.kt"); + } + + @Test + @TestMetadata("kt48935_4.kt") + public void testKt48935_4() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt48935_4.kt"); + } + + @Test + @TestMetadata("kt48935_5.kt") + public void testKt48935_5() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt48935_5.kt"); + } + + @Test + @TestMetadata("kt48935_6.kt") + public void testKt48935_6() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt48935_6.kt"); + } + + @Test + @TestMetadata("kt49661.kt") + public void testKt49661() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt49661.kt"); + } + + @Test + @TestMetadata("kt51016.kt") + public void testKt51016() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt51016.kt"); + } + + @Test + @TestMetadata("nullableEmptyIntersection.kt") + public void testNullableEmptyIntersection() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/nullableEmptyIntersection.kt"); + } + + @Test + @TestMetadata("selectFromCovariantAndContravariantTypes.kt") + public void testSelectFromCovariantAndContravariantTypes() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/selectFromCovariantAndContravariantTypes.kt"); + } + } + @Nested @TestMetadata("compiler/testData/diagnostics/tests/inference/nestedCalls") @TestDataPath("$PROJECT_ROOT") diff --git a/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/ResolutionParts.kt b/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/ResolutionParts.kt index cf3076e7820..4e0dfe4e6dd 100644 --- a/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/ResolutionParts.kt +++ b/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/ResolutionParts.kt @@ -29,6 +29,7 @@ import org.jetbrains.kotlin.types.error.ErrorUtils import org.jetbrains.kotlin.types.model.* import org.jetbrains.kotlin.types.typeUtil.* import org.jetbrains.kotlin.utils.SmartList +import org.jetbrains.kotlin.utils.addToStdlib.cast import org.jetbrains.kotlin.utils.addToStdlib.compactIfPossible import org.jetbrains.kotlin.utils.addToStdlib.safeAs @@ -880,6 +881,13 @@ internal object CheckContextReceiversResolutionPart : ResolutionPart() { } internal object CheckIncompatibleTypeVariableUpperBounds : ResolutionPart() { + /* + * Check if the candidate was already discriminated by `CompatibilityOfTypeVariableAsIntersectionTypePart` resolution part + * If it's true we shouldn't mark the candidate with warning, but should mark with error, to repeat the existing proper behaviour + */ + private fun ResolutionCandidate.wasPreviouslyDiscriminated(upperTypes: List) = + callComponents.statelessCallbacks.isOldIntersectionIsEmpty(upperTypes.cast()) + override fun ResolutionCandidate.process(workIndex: Int) = with(getSystem().asConstraintSystemCompleterContext()) { for (variableWithConstraints in getSystem().getBuilder().currentStorage().notFixedTypeVariables.values) { val upperTypes = variableWithConstraints.constraints.extractUpperTypesToCheckIntersectionEmptiness() @@ -888,8 +896,9 @@ internal object CheckIncompatibleTypeVariableUpperBounds : ResolutionPart() { val isInferredEmptyIntersectionForbidden = callComponents.languageVersionSettings.supportsFeature(LanguageFeature.ForbidInferringTypeVariablesIntoEmptyIntersection) - val errorFactory = - if (isInferredEmptyIntersectionForbidden) ::InferredEmptyIntersectionError else ::InferredEmptyIntersectionWarning + val errorFactory = if (isInferredEmptyIntersectionForbidden || wasPreviouslyDiscriminated(upperTypes)) + ::InferredEmptyIntersectionError + else ::InferredEmptyIntersectionWarning addError(errorFactory(upperTypes, variableWithConstraints.typeVariable)) } } diff --git a/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_29.fir.kt b/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_29.fir.kt index 98674519815..8d926c469b2 100644 --- a/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_29.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_29.fir.kt @@ -11,5 +11,5 @@ interface B fun > main() { val foo = Foo() - Bar>().takeFoo(foo) // error in 1.3.72, no error in 1.4.31 + Bar>().takeFoo(foo) // error in 1.3.72, no error in 1.4.31 } diff --git a/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_30.fir.kt b/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_30.fir.kt index 7437993de9d..a1d0271aec5 100644 --- a/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_30.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_30.fir.kt @@ -11,5 +11,5 @@ interface B : A fun >> main() { val foo = Foo() - Bar>>().takeFoo(foo) // error in 1.3.72, no error in 1.4.31 + Bar>>().takeFoo(foo) // error in 1.3.72, no error in 1.4.31 } diff --git a/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_31.fir.kt b/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_31.fir.kt index 24364ceab0b..bdcc7a79f22 100644 --- a/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_31.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_31.fir.kt @@ -11,5 +11,5 @@ interface B : A fun >> main() { val foo = Foo() - Bar>().takeFoo(foo) // error in 1.3.72, no error in 1.4.31 + Bar>().takeFoo(foo) // error in 1.3.72, no error in 1.4.31 } diff --git a/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_32.fir.kt b/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_32.fir.kt index a1c46761b80..4e365b5cae3 100644 --- a/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_32.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_32.fir.kt @@ -12,5 +12,5 @@ interface C : A fun > main() { val foo = Foo() - Bar>().takeFoo(foo) // error in 1.3.72, no error in 1.4.31 + Bar>().takeFoo(foo) // error in 1.3.72, no error in 1.4.31 } diff --git a/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_33.fir.kt b/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_33.fir.kt index 0af0f745e3f..d91aceb2e39 100644 --- a/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_33.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_33.fir.kt @@ -12,5 +12,5 @@ class C : A fun Out> main() { val foo = Foo() - Bar>().takeFoo(foo) // error in 1.3.72, no error in 1.4.31 + Bar>().takeFoo(foo) // error in 1.3.72, no error in 1.4.31 } diff --git a/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_34.fir.kt b/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_34.fir.kt index a3dbc03234e..ff2edc4c2f5 100644 --- a/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_34.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_34.fir.kt @@ -11,5 +11,5 @@ class B : A fun >> main() { val foo = Foo() - Bar>().takeFoo(foo) // error in 1.3.72, no error in 1.4.31 + Bar>().takeFoo(foo) // error in 1.3.72, no error in 1.4.31 } diff --git a/compiler/testData/diagnostics/testsWithStdLib/inference/completion/postponedArgumentsAnalysis/callableReferences.kt b/compiler/testData/diagnostics/testsWithStdLib/inference/completion/postponedArgumentsAnalysis/callableReferences.kt index ba831efc6ba..056c846d601 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/inference/completion/postponedArgumentsAnalysis/callableReferences.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/inference/completion/postponedArgumentsAnalysis/callableReferences.kt @@ -53,5 +53,5 @@ fun main() { select(id(::foo5), id { x: A -> }, id { x: B -> }, id { it }) - val x2: (Int) -> Unit = selectNumber(id(::foo6), id { x -> & Number}")!>x }, id { & Number}")!>it }) + val x2: (Int) -> Unit = selectNumber(id(::foo6), id { x -> & Number}")!>x }, id { & Number}")!>it }) }