[Test] Add regression tests for issues which are fixed in K2

Related issues:
KT-10879, KT-18055, KT-20617, KT-23873
KT-25668, KT-31191, KT-33108, KT-41013
KT-51827, KT-53886, KT-56624, KT-58447
KT-58458, KT-58751, KT-58814, KT-60597
KT-62806, KT-63258, KT-63444, KT-65101
KT-65408, KT-65844, KT-66186

^KT-65926 Fixed
This commit is contained in:
Dmitriy Novozhilov
2024-02-28 12:13:45 +02:00
committed by Space Team
parent b875ae774e
commit 4b5eac7816
79 changed files with 1719 additions and 0 deletions
@@ -1605,6 +1605,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
runTest("compiler/testData/diagnostics/tests/Unresolved.kt");
}
@Test
@TestMetadata("unresolvedNameInBackticksInReceiver.kt")
public void testUnresolvedNameInBackticksInReceiver() {
runTest("compiler/testData/diagnostics/tests/unresolvedNameInBackticksInReceiver.kt");
}
@Test
@TestMetadata("UnusedInDestructuring.kt")
public void testUnusedInDestructuring() {
@@ -2316,6 +2322,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
runTest("compiler/testData/diagnostics/tests/annotations/onMultiDeclaration.kt");
}
@Test
@TestMetadata("OptInWithArrayArgument.kt")
public void testOptInWithArrayArgument() {
runTest("compiler/testData/diagnostics/tests/annotations/OptInWithArrayArgument.kt");
}
@Test
@TestMetadata("propagationAnnotationToLocalMemberFunction.kt")
public void testPropagationAnnotationToLocalMemberFunction() {
@@ -2406,6 +2418,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
runTest("compiler/testData/diagnostics/tests/annotations/RecursivelyIncorrectlyAnnotatedParameter.kt");
}
@Test
@TestMetadata("referenceOfAnnotatedFunctionInAnnotation.kt")
public void testReferenceOfAnnotatedFunctionInAnnotation() {
runTest("compiler/testData/diagnostics/tests/annotations/referenceOfAnnotatedFunctionInAnnotation.kt");
}
@Test
@TestMetadata("requireKotlin.kt")
public void testRequireKotlin() {
@@ -6370,6 +6388,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
runTest("compiler/testData/diagnostics/tests/cast/kt614.kt");
}
@Test
@TestMetadata("nonUselessCastInLambda.kt")
public void testNonUselessCastInLambda() {
runTest("compiler/testData/diagnostics/tests/cast/nonUselessCastInLambda.kt");
}
@Test
@TestMetadata("nothingAs.kt")
public void testNothingAs() {
@@ -6388,6 +6412,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
runTest("compiler/testData/diagnostics/tests/cast/StableTypeForUselessCast.kt");
}
@Test
@TestMetadata("usefulCastInGetOperator.kt")
public void testUsefulCastInGetOperator() {
runTest("compiler/testData/diagnostics/tests/cast/usefulCastInGetOperator.kt");
}
@Test
@TestMetadata("UselessSafeCast.kt")
public void testUselessSafeCast() {
@@ -9296,6 +9326,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
runTest("compiler/testData/diagnostics/tests/dataClasses/conflictingOverloads.kt");
}
@Test
@TestMetadata("copyInDataObject.kt")
public void testCopyInDataObject() {
runTest("compiler/testData/diagnostics/tests/dataClasses/copyInDataObject.kt");
}
@Test
@TestMetadata("copyOfPrivateClass.kt")
public void testCopyOfPrivateClass() {
@@ -13403,6 +13439,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
public void testSimple() {
runTest("compiler/testData/diagnostics/tests/explicitDefinitelyNotNullableViaIntersection/simple.kt");
}
@Test
@TestMetadata("starProjection.kt")
public void testStarProjection() {
runTest("compiler/testData/diagnostics/tests/explicitDefinitelyNotNullableViaIntersection/starProjection.kt");
}
}
@Nested
@@ -15939,6 +15981,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
@TestMetadata("compiler/testData/diagnostics/tests/imports")
@TestDataPath("$PROJECT_ROOT")
public class Imports {
@Test
@TestMetadata("aliasedImportOfEnumConstructor.kt")
public void testAliasedImportOfEnumConstructor() {
runTest("compiler/testData/diagnostics/tests/imports/aliasedImportOfEnumConstructor.kt");
}
@Test
public void testAllFilesPresentInImports() {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/imports"), Pattern.compile("^(.+)\\.(kt|kts)$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true);
@@ -16718,6 +16766,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
runTest("compiler/testData/diagnostics/tests/inference/completionOfMultipleLambdas.kt");
}
@Test
@TestMetadata("complexInferenceOnParentizedExpression.kt")
public void testComplexInferenceOnParentizedExpression() {
runTest("compiler/testData/diagnostics/tests/inference/complexInferenceOnParentizedExpression.kt");
}
@Test
@TestMetadata("conflictingSubstitutions.kt")
public void testConflictingSubstitutions() {
@@ -20523,6 +20577,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
runTest("compiler/testData/diagnostics/tests/inference/reportingImprovements/kt42620.kt");
}
@Test
@TestMetadata("multipleDiagnosticsInOneCallChain.kt")
public void testMultipleDiagnosticsInOneCallChain() {
runTest("compiler/testData/diagnostics/tests/inference/reportingImprovements/multipleDiagnosticsInOneCallChain.kt");
}
@Test
@TestMetadata("NoAmbiguityForDifferentFunctionTypes.kt")
public void testNoAmbiguityForDifferentFunctionTypes() {
@@ -21946,6 +22006,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
runTest("compiler/testData/diagnostics/tests/inner/selfAnnotationForClassObject.kt");
}
@Test
@TestMetadata("starProjectedInnerType.kt")
public void testStarProjectedInnerType() {
runTest("compiler/testData/diagnostics/tests/inner/starProjectedInnerType.kt");
}
@Test
@TestMetadata("traits.kt")
public void testTraits() {
@@ -24265,6 +24331,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
public void testMultipleLabels() {
runTest("compiler/testData/diagnostics/tests/labels/multipleLabels.kt");
}
@Test
@TestMetadata("qualifiedThisInExtensionProperty.kt")
public void testQualifiedThisInExtensionProperty() {
runTest("compiler/testData/diagnostics/tests/labels/qualifiedThisInExtensionProperty.kt");
}
}
@Nested
@@ -28664,6 +28736,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
runTest("compiler/testData/diagnostics/tests/overload/disambiguateByFailedAbstractClassCheck.kt");
}
@Test
@TestMetadata("disambiguateByNumberOfLambdaArgument.kt")
public void testDisambiguateByNumberOfLambdaArgument() {
runTest("compiler/testData/diagnostics/tests/overload/disambiguateByNumberOfLambdaArgument.kt");
}
@Test
@TestMetadata("doubleWinsOverFloat.kt")
public void testDoubleWinsOverFloat() {
@@ -32286,6 +32364,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
runTest("compiler/testData/diagnostics/tests/resolve/anonymousObjectFromTopLevelMember.kt");
}
@Test
@TestMetadata("callToProtectedOnSmartcast.kt")
public void testCallToProtectedOnSmartcast() {
runTest("compiler/testData/diagnostics/tests/resolve/callToProtectedOnSmartcast.kt");
}
@Test
@TestMetadata("callableReferenceInCST.kt")
public void testCallableReferenceInCST() {
@@ -36046,6 +36130,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
runTest("compiler/testData/diagnostics/tests/smartCasts/smartCastWithOrFalse.kt");
}
@Test
@TestMetadata("smartcastBetweenClassAndTypeParameter.kt")
public void testSmartcastBetweenClassAndTypeParameter() {
runTest("compiler/testData/diagnostics/tests/smartCasts/smartcastBetweenClassAndTypeParameter.kt");
}
@Test
@TestMetadata("smartcastInFriendModule.kt")
public void testSmartcastInFriendModule() {
@@ -36082,6 +36172,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
runTest("compiler/testData/diagnostics/tests/smartCasts/smartcastToStarProjection.kt");
}
@Test
@TestMetadata("syntheticAccessorOnSmartcastedReceiver.kt")
public void testSyntheticAccessorOnSmartcastedReceiver() {
runTest("compiler/testData/diagnostics/tests/smartCasts/syntheticAccessorOnSmartcastedReceiver.kt");
}
@Test
@TestMetadata("thisWithLabel.kt")
public void testThisWithLabel() {
@@ -37405,6 +37501,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
runTest("compiler/testData/diagnostics/tests/smartCasts/variables/propertyNotNeeded.kt");
}
@Test
@TestMetadata("propertyOfLocalClass.kt")
public void testPropertyOfLocalClass() {
runTest("compiler/testData/diagnostics/tests/smartCasts/variables/propertyOfLocalClass.kt");
}
@Test
@TestMetadata("propertySubtype.kt")
public void testPropertySubtype() {
@@ -41967,6 +42069,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
runTest("compiler/testData/diagnostics/tests/when/withSubjectVariable/subjectVariableInIsPattern.kt");
}
@Test
@TestMetadata("unnamedSubject.kt")
public void testUnnamedSubject() {
runTest("compiler/testData/diagnostics/tests/when/withSubjectVariable/unnamedSubject.kt");
}
@Test
@TestMetadata("unsupportedFeature.kt")
public void testUnsupportedFeature() {
@@ -44027,6 +44135,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/safecallAndReturnsNull.kt");
}
@Test
@TestMetadata("smartcastOnReceiverInComplexCondition.kt")
public void testSmartcastOnReceiverInComplexCondition() {
runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/smartcastOnReceiverInComplexCondition.kt");
}
@Test
@TestMetadata("throwsEffect.kt")
public void testThrowsEffect() {
@@ -44969,6 +45083,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/allMembersAllowed.kt");
}
@Test
@TestMetadata("callableReference.kt")
public void testCallableReference() {
runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/callableReference.kt");
}
@Test
@TestMetadata("extensions.kt")
public void testExtensions() {
@@ -22714,6 +22714,12 @@ public class LLFirBlackBoxCodegenBasedTestGenerated extends AbstractLLFirBlackBo
runTest("compiler/testData/codegen/box/functions/kt873.kt");
}
@Test
@TestMetadata("lambdaWithTwoContextReceivers.kt")
public void testLambdaWithTwoContextReceivers() {
runTest("compiler/testData/codegen/box/functions/lambdaWithTwoContextReceivers.kt");
}
@Test
@TestMetadata("localFunction.kt")
public void testLocalFunction() {
@@ -24020,6 +24026,12 @@ public class LLFirBlackBoxCodegenBasedTestGenerated extends AbstractLLFirBlackBo
runTest("compiler/testData/codegen/box/inference/referenceToCatchParameterFromLambdaExpression.kt");
}
@Test
@TestMetadata("safeCastWithElvis.kt")
public void testSafeCastWithElvis() {
runTest("compiler/testData/codegen/box/inference/safeCastWithElvis.kt");
}
@Test
@TestMetadata("specialCallsWithCallableReferences.kt")
public void testSpecialCallsWithCallableReferences() {
@@ -36506,6 +36518,12 @@ public class LLFirBlackBoxCodegenBasedTestGenerated extends AbstractLLFirBlackBo
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/lambda"), Pattern.compile("^(.+)\\.kt$"), null, true);
}
@Test
@TestMetadata("ifWithReferenceAndLambda.kt")
public void testIfWithReferenceAndLambda() {
runTest("compiler/testData/codegen/box/lambda/ifWithReferenceAndLambda.kt");
}
@Test
@TestMetadata("lambda1.kt")
public void testLambda1() {
@@ -1605,6 +1605,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
runTest("compiler/testData/diagnostics/tests/Unresolved.kt");
}
@Test
@TestMetadata("unresolvedNameInBackticksInReceiver.kt")
public void testUnresolvedNameInBackticksInReceiver() {
runTest("compiler/testData/diagnostics/tests/unresolvedNameInBackticksInReceiver.kt");
}
@Test
@TestMetadata("UnusedInDestructuring.kt")
public void testUnusedInDestructuring() {
@@ -2316,6 +2322,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
runTest("compiler/testData/diagnostics/tests/annotations/onMultiDeclaration.kt");
}
@Test
@TestMetadata("OptInWithArrayArgument.kt")
public void testOptInWithArrayArgument() {
runTest("compiler/testData/diagnostics/tests/annotations/OptInWithArrayArgument.kt");
}
@Test
@TestMetadata("propagationAnnotationToLocalMemberFunction.kt")
public void testPropagationAnnotationToLocalMemberFunction() {
@@ -2406,6 +2418,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
runTest("compiler/testData/diagnostics/tests/annotations/RecursivelyIncorrectlyAnnotatedParameter.kt");
}
@Test
@TestMetadata("referenceOfAnnotatedFunctionInAnnotation.kt")
public void testReferenceOfAnnotatedFunctionInAnnotation() {
runTest("compiler/testData/diagnostics/tests/annotations/referenceOfAnnotatedFunctionInAnnotation.kt");
}
@Test
@TestMetadata("requireKotlin.kt")
public void testRequireKotlin() {
@@ -6370,6 +6388,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
runTest("compiler/testData/diagnostics/tests/cast/kt614.kt");
}
@Test
@TestMetadata("nonUselessCastInLambda.kt")
public void testNonUselessCastInLambda() {
runTest("compiler/testData/diagnostics/tests/cast/nonUselessCastInLambda.kt");
}
@Test
@TestMetadata("nothingAs.kt")
public void testNothingAs() {
@@ -6388,6 +6412,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
runTest("compiler/testData/diagnostics/tests/cast/StableTypeForUselessCast.kt");
}
@Test
@TestMetadata("usefulCastInGetOperator.kt")
public void testUsefulCastInGetOperator() {
runTest("compiler/testData/diagnostics/tests/cast/usefulCastInGetOperator.kt");
}
@Test
@TestMetadata("UselessSafeCast.kt")
public void testUselessSafeCast() {
@@ -9296,6 +9326,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
runTest("compiler/testData/diagnostics/tests/dataClasses/conflictingOverloads.kt");
}
@Test
@TestMetadata("copyInDataObject.kt")
public void testCopyInDataObject() {
runTest("compiler/testData/diagnostics/tests/dataClasses/copyInDataObject.kt");
}
@Test
@TestMetadata("copyOfPrivateClass.kt")
public void testCopyOfPrivateClass() {
@@ -13403,6 +13439,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
public void testSimple() {
runTest("compiler/testData/diagnostics/tests/explicitDefinitelyNotNullableViaIntersection/simple.kt");
}
@Test
@TestMetadata("starProjection.kt")
public void testStarProjection() {
runTest("compiler/testData/diagnostics/tests/explicitDefinitelyNotNullableViaIntersection/starProjection.kt");
}
}
@Nested
@@ -15939,6 +15981,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
@TestMetadata("compiler/testData/diagnostics/tests/imports")
@TestDataPath("$PROJECT_ROOT")
public class Imports {
@Test
@TestMetadata("aliasedImportOfEnumConstructor.kt")
public void testAliasedImportOfEnumConstructor() {
runTest("compiler/testData/diagnostics/tests/imports/aliasedImportOfEnumConstructor.kt");
}
@Test
public void testAllFilesPresentInImports() {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/imports"), Pattern.compile("^(.+)\\.(kt|kts)$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true);
@@ -16718,6 +16766,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
runTest("compiler/testData/diagnostics/tests/inference/completionOfMultipleLambdas.kt");
}
@Test
@TestMetadata("complexInferenceOnParentizedExpression.kt")
public void testComplexInferenceOnParentizedExpression() {
runTest("compiler/testData/diagnostics/tests/inference/complexInferenceOnParentizedExpression.kt");
}
@Test
@TestMetadata("conflictingSubstitutions.kt")
public void testConflictingSubstitutions() {
@@ -20523,6 +20577,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
runTest("compiler/testData/diagnostics/tests/inference/reportingImprovements/kt42620.kt");
}
@Test
@TestMetadata("multipleDiagnosticsInOneCallChain.kt")
public void testMultipleDiagnosticsInOneCallChain() {
runTest("compiler/testData/diagnostics/tests/inference/reportingImprovements/multipleDiagnosticsInOneCallChain.kt");
}
@Test
@TestMetadata("NoAmbiguityForDifferentFunctionTypes.kt")
public void testNoAmbiguityForDifferentFunctionTypes() {
@@ -21946,6 +22006,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
runTest("compiler/testData/diagnostics/tests/inner/selfAnnotationForClassObject.kt");
}
@Test
@TestMetadata("starProjectedInnerType.kt")
public void testStarProjectedInnerType() {
runTest("compiler/testData/diagnostics/tests/inner/starProjectedInnerType.kt");
}
@Test
@TestMetadata("traits.kt")
public void testTraits() {
@@ -24265,6 +24331,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
public void testMultipleLabels() {
runTest("compiler/testData/diagnostics/tests/labels/multipleLabels.kt");
}
@Test
@TestMetadata("qualifiedThisInExtensionProperty.kt")
public void testQualifiedThisInExtensionProperty() {
runTest("compiler/testData/diagnostics/tests/labels/qualifiedThisInExtensionProperty.kt");
}
}
@Nested
@@ -28664,6 +28736,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
runTest("compiler/testData/diagnostics/tests/overload/disambiguateByFailedAbstractClassCheck.kt");
}
@Test
@TestMetadata("disambiguateByNumberOfLambdaArgument.kt")
public void testDisambiguateByNumberOfLambdaArgument() {
runTest("compiler/testData/diagnostics/tests/overload/disambiguateByNumberOfLambdaArgument.kt");
}
@Test
@TestMetadata("doubleWinsOverFloat.kt")
public void testDoubleWinsOverFloat() {
@@ -32286,6 +32364,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
runTest("compiler/testData/diagnostics/tests/resolve/anonymousObjectFromTopLevelMember.kt");
}
@Test
@TestMetadata("callToProtectedOnSmartcast.kt")
public void testCallToProtectedOnSmartcast() {
runTest("compiler/testData/diagnostics/tests/resolve/callToProtectedOnSmartcast.kt");
}
@Test
@TestMetadata("callableReferenceInCST.kt")
public void testCallableReferenceInCST() {
@@ -36046,6 +36130,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
runTest("compiler/testData/diagnostics/tests/smartCasts/smartCastWithOrFalse.kt");
}
@Test
@TestMetadata("smartcastBetweenClassAndTypeParameter.kt")
public void testSmartcastBetweenClassAndTypeParameter() {
runTest("compiler/testData/diagnostics/tests/smartCasts/smartcastBetweenClassAndTypeParameter.kt");
}
@Test
@TestMetadata("smartcastInFriendModule.kt")
public void testSmartcastInFriendModule() {
@@ -36082,6 +36172,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
runTest("compiler/testData/diagnostics/tests/smartCasts/smartcastToStarProjection.kt");
}
@Test
@TestMetadata("syntheticAccessorOnSmartcastedReceiver.kt")
public void testSyntheticAccessorOnSmartcastedReceiver() {
runTest("compiler/testData/diagnostics/tests/smartCasts/syntheticAccessorOnSmartcastedReceiver.kt");
}
@Test
@TestMetadata("thisWithLabel.kt")
public void testThisWithLabel() {
@@ -37405,6 +37501,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
runTest("compiler/testData/diagnostics/tests/smartCasts/variables/propertyNotNeeded.kt");
}
@Test
@TestMetadata("propertyOfLocalClass.kt")
public void testPropertyOfLocalClass() {
runTest("compiler/testData/diagnostics/tests/smartCasts/variables/propertyOfLocalClass.kt");
}
@Test
@TestMetadata("propertySubtype.kt")
public void testPropertySubtype() {
@@ -41967,6 +42069,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
runTest("compiler/testData/diagnostics/tests/when/withSubjectVariable/subjectVariableInIsPattern.kt");
}
@Test
@TestMetadata("unnamedSubject.kt")
public void testUnnamedSubject() {
runTest("compiler/testData/diagnostics/tests/when/withSubjectVariable/unnamedSubject.kt");
}
@Test
@TestMetadata("unsupportedFeature.kt")
public void testUnsupportedFeature() {
@@ -44027,6 +44135,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/safecallAndReturnsNull.kt");
}
@Test
@TestMetadata("smartcastOnReceiverInComplexCondition.kt")
public void testSmartcastOnReceiverInComplexCondition() {
runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/smartcastOnReceiverInComplexCondition.kt");
}
@Test
@TestMetadata("throwsEffect.kt")
public void testThrowsEffect() {
@@ -44969,6 +45083,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/allMembersAllowed.kt");
}
@Test
@TestMetadata("callableReference.kt")
public void testCallableReference() {
runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/callableReference.kt");
}
@Test
@TestMetadata("extensions.kt")
public void testExtensions() {
@@ -22714,6 +22714,12 @@ public class LLFirReversedBlackBoxCodegenBasedTestGenerated extends AbstractLLFi
runTest("compiler/testData/codegen/box/functions/kt873.kt");
}
@Test
@TestMetadata("lambdaWithTwoContextReceivers.kt")
public void testLambdaWithTwoContextReceivers() {
runTest("compiler/testData/codegen/box/functions/lambdaWithTwoContextReceivers.kt");
}
@Test
@TestMetadata("localFunction.kt")
public void testLocalFunction() {
@@ -24020,6 +24026,12 @@ public class LLFirReversedBlackBoxCodegenBasedTestGenerated extends AbstractLLFi
runTest("compiler/testData/codegen/box/inference/referenceToCatchParameterFromLambdaExpression.kt");
}
@Test
@TestMetadata("safeCastWithElvis.kt")
public void testSafeCastWithElvis() {
runTest("compiler/testData/codegen/box/inference/safeCastWithElvis.kt");
}
@Test
@TestMetadata("specialCallsWithCallableReferences.kt")
public void testSpecialCallsWithCallableReferences() {
@@ -36506,6 +36518,12 @@ public class LLFirReversedBlackBoxCodegenBasedTestGenerated extends AbstractLLFi
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/lambda"), Pattern.compile("^(.+)\\.kt$"), null, true);
}
@Test
@TestMetadata("ifWithReferenceAndLambda.kt")
public void testIfWithReferenceAndLambda() {
runTest("compiler/testData/codegen/box/lambda/ifWithReferenceAndLambda.kt");
}
@Test
@TestMetadata("lambda1.kt")
public void testLambda1() {
@@ -1605,6 +1605,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
runTest("compiler/testData/diagnostics/tests/Unresolved.kt");
}
@Test
@TestMetadata("unresolvedNameInBackticksInReceiver.kt")
public void testUnresolvedNameInBackticksInReceiver() {
runTest("compiler/testData/diagnostics/tests/unresolvedNameInBackticksInReceiver.kt");
}
@Test
@TestMetadata("UnusedInDestructuring.kt")
public void testUnusedInDestructuring() {
@@ -2310,6 +2316,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
runTest("compiler/testData/diagnostics/tests/annotations/onMultiDeclaration.kt");
}
@Test
@TestMetadata("OptInWithArrayArgument.kt")
public void testOptInWithArrayArgument() {
runTest("compiler/testData/diagnostics/tests/annotations/OptInWithArrayArgument.kt");
}
@Test
@TestMetadata("propagationAnnotationToLocalMemberFunction.kt")
public void testPropagationAnnotationToLocalMemberFunction() {
@@ -2400,6 +2412,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
runTest("compiler/testData/diagnostics/tests/annotations/RecursivelyIncorrectlyAnnotatedParameter.kt");
}
@Test
@TestMetadata("referenceOfAnnotatedFunctionInAnnotation.kt")
public void testReferenceOfAnnotatedFunctionInAnnotation() {
runTest("compiler/testData/diagnostics/tests/annotations/referenceOfAnnotatedFunctionInAnnotation.kt");
}
@Test
@TestMetadata("requireKotlin.kt")
public void testRequireKotlin() {
@@ -6364,6 +6382,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
runTest("compiler/testData/diagnostics/tests/cast/kt614.kt");
}
@Test
@TestMetadata("nonUselessCastInLambda.kt")
public void testNonUselessCastInLambda() {
runTest("compiler/testData/diagnostics/tests/cast/nonUselessCastInLambda.kt");
}
@Test
@TestMetadata("nothingAs.kt")
public void testNothingAs() {
@@ -6382,6 +6406,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
runTest("compiler/testData/diagnostics/tests/cast/StableTypeForUselessCast.kt");
}
@Test
@TestMetadata("usefulCastInGetOperator.kt")
public void testUsefulCastInGetOperator() {
runTest("compiler/testData/diagnostics/tests/cast/usefulCastInGetOperator.kt");
}
@Test
@TestMetadata("UselessSafeCast.kt")
public void testUselessSafeCast() {
@@ -9290,6 +9320,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
runTest("compiler/testData/diagnostics/tests/dataClasses/conflictingOverloads.kt");
}
@Test
@TestMetadata("copyInDataObject.kt")
public void testCopyInDataObject() {
runTest("compiler/testData/diagnostics/tests/dataClasses/copyInDataObject.kt");
}
@Test
@TestMetadata("copyOfPrivateClass.kt")
public void testCopyOfPrivateClass() {
@@ -13397,6 +13433,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
public void testSimple() {
runTest("compiler/testData/diagnostics/tests/explicitDefinitelyNotNullableViaIntersection/simple.kt");
}
@Test
@TestMetadata("starProjection.kt")
public void testStarProjection() {
runTest("compiler/testData/diagnostics/tests/explicitDefinitelyNotNullableViaIntersection/starProjection.kt");
}
}
@Nested
@@ -15933,6 +15975,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
@TestMetadata("compiler/testData/diagnostics/tests/imports")
@TestDataPath("$PROJECT_ROOT")
public class Imports {
@Test
@TestMetadata("aliasedImportOfEnumConstructor.kt")
public void testAliasedImportOfEnumConstructor() {
runTest("compiler/testData/diagnostics/tests/imports/aliasedImportOfEnumConstructor.kt");
}
@Test
public void testAllFilesPresentInImports() {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/imports"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true, "multiplatform");
@@ -16712,6 +16760,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
runTest("compiler/testData/diagnostics/tests/inference/completionOfMultipleLambdas.kt");
}
@Test
@TestMetadata("complexInferenceOnParentizedExpression.kt")
public void testComplexInferenceOnParentizedExpression() {
runTest("compiler/testData/diagnostics/tests/inference/complexInferenceOnParentizedExpression.kt");
}
@Test
@TestMetadata("conflictingSubstitutions.kt")
public void testConflictingSubstitutions() {
@@ -20517,6 +20571,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
runTest("compiler/testData/diagnostics/tests/inference/reportingImprovements/kt42620.kt");
}
@Test
@TestMetadata("multipleDiagnosticsInOneCallChain.kt")
public void testMultipleDiagnosticsInOneCallChain() {
runTest("compiler/testData/diagnostics/tests/inference/reportingImprovements/multipleDiagnosticsInOneCallChain.kt");
}
@Test
@TestMetadata("NoAmbiguityForDifferentFunctionTypes.kt")
public void testNoAmbiguityForDifferentFunctionTypes() {
@@ -21940,6 +22000,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
runTest("compiler/testData/diagnostics/tests/inner/selfAnnotationForClassObject.kt");
}
@Test
@TestMetadata("starProjectedInnerType.kt")
public void testStarProjectedInnerType() {
runTest("compiler/testData/diagnostics/tests/inner/starProjectedInnerType.kt");
}
@Test
@TestMetadata("traits.kt")
public void testTraits() {
@@ -24259,6 +24325,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
public void testMultipleLabels() {
runTest("compiler/testData/diagnostics/tests/labels/multipleLabels.kt");
}
@Test
@TestMetadata("qualifiedThisInExtensionProperty.kt")
public void testQualifiedThisInExtensionProperty() {
runTest("compiler/testData/diagnostics/tests/labels/qualifiedThisInExtensionProperty.kt");
}
}
@Nested
@@ -26368,6 +26440,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
runTest("compiler/testData/diagnostics/tests/overload/disambiguateByFailedAbstractClassCheck.kt");
}
@Test
@TestMetadata("disambiguateByNumberOfLambdaArgument.kt")
public void testDisambiguateByNumberOfLambdaArgument() {
runTest("compiler/testData/diagnostics/tests/overload/disambiguateByNumberOfLambdaArgument.kt");
}
@Test
@TestMetadata("doubleWinsOverFloat.kt")
public void testDoubleWinsOverFloat() {
@@ -29984,6 +30062,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
runTest("compiler/testData/diagnostics/tests/resolve/anonymousObjectFromTopLevelMember.kt");
}
@Test
@TestMetadata("callToProtectedOnSmartcast.kt")
public void testCallToProtectedOnSmartcast() {
runTest("compiler/testData/diagnostics/tests/resolve/callToProtectedOnSmartcast.kt");
}
@Test
@TestMetadata("callableReferenceInCST.kt")
public void testCallableReferenceInCST() {
@@ -33618,6 +33702,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
runTest("compiler/testData/diagnostics/tests/smartCasts/smartCastWithOrFalse.kt");
}
@Test
@TestMetadata("smartcastBetweenClassAndTypeParameter.kt")
public void testSmartcastBetweenClassAndTypeParameter() {
runTest("compiler/testData/diagnostics/tests/smartCasts/smartcastBetweenClassAndTypeParameter.kt");
}
@Test
@TestMetadata("smartcastInFriendModule.kt")
public void testSmartcastInFriendModule() {
@@ -33654,6 +33744,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
runTest("compiler/testData/diagnostics/tests/smartCasts/smartcastToStarProjection.kt");
}
@Test
@TestMetadata("syntheticAccessorOnSmartcastedReceiver.kt")
public void testSyntheticAccessorOnSmartcastedReceiver() {
runTest("compiler/testData/diagnostics/tests/smartCasts/syntheticAccessorOnSmartcastedReceiver.kt");
}
@Test
@TestMetadata("thisWithLabel.kt")
public void testThisWithLabel() {
@@ -34977,6 +35073,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
runTest("compiler/testData/diagnostics/tests/smartCasts/variables/propertyNotNeeded.kt");
}
@Test
@TestMetadata("propertyOfLocalClass.kt")
public void testPropertyOfLocalClass() {
runTest("compiler/testData/diagnostics/tests/smartCasts/variables/propertyOfLocalClass.kt");
}
@Test
@TestMetadata("propertySubtype.kt")
public void testPropertySubtype() {
@@ -39539,6 +39641,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
runTest("compiler/testData/diagnostics/tests/when/withSubjectVariable/subjectVariableInIsPattern.kt");
}
@Test
@TestMetadata("unnamedSubject.kt")
public void testUnnamedSubject() {
runTest("compiler/testData/diagnostics/tests/when/withSubjectVariable/unnamedSubject.kt");
}
@Test
@TestMetadata("unsupportedFeature.kt")
public void testUnsupportedFeature() {
@@ -41599,6 +41707,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/safecallAndReturnsNull.kt");
}
@Test
@TestMetadata("smartcastOnReceiverInComplexCondition.kt")
public void testSmartcastOnReceiverInComplexCondition() {
runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/smartcastOnReceiverInComplexCondition.kt");
}
@Test
@TestMetadata("throwsEffect.kt")
public void testThrowsEffect() {
@@ -42541,6 +42655,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/allMembersAllowed.kt");
}
@Test
@TestMetadata("callableReference.kt")
public void testCallableReference() {
runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/callableReference.kt");
}
@Test
@TestMetadata("extensions.kt")
public void testExtensions() {
@@ -1605,6 +1605,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
runTest("compiler/testData/diagnostics/tests/Unresolved.kt");
}
@Test
@TestMetadata("unresolvedNameInBackticksInReceiver.kt")
public void testUnresolvedNameInBackticksInReceiver() {
runTest("compiler/testData/diagnostics/tests/unresolvedNameInBackticksInReceiver.kt");
}
@Test
@TestMetadata("UnusedInDestructuring.kt")
public void testUnusedInDestructuring() {
@@ -2316,6 +2322,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
runTest("compiler/testData/diagnostics/tests/annotations/onMultiDeclaration.kt");
}
@Test
@TestMetadata("OptInWithArrayArgument.kt")
public void testOptInWithArrayArgument() {
runTest("compiler/testData/diagnostics/tests/annotations/OptInWithArrayArgument.kt");
}
@Test
@TestMetadata("propagationAnnotationToLocalMemberFunction.kt")
public void testPropagationAnnotationToLocalMemberFunction() {
@@ -2406,6 +2418,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
runTest("compiler/testData/diagnostics/tests/annotations/RecursivelyIncorrectlyAnnotatedParameter.kt");
}
@Test
@TestMetadata("referenceOfAnnotatedFunctionInAnnotation.kt")
public void testReferenceOfAnnotatedFunctionInAnnotation() {
runTest("compiler/testData/diagnostics/tests/annotations/referenceOfAnnotatedFunctionInAnnotation.kt");
}
@Test
@TestMetadata("requireKotlin.kt")
public void testRequireKotlin() {
@@ -6370,6 +6388,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
runTest("compiler/testData/diagnostics/tests/cast/kt614.kt");
}
@Test
@TestMetadata("nonUselessCastInLambda.kt")
public void testNonUselessCastInLambda() {
runTest("compiler/testData/diagnostics/tests/cast/nonUselessCastInLambda.kt");
}
@Test
@TestMetadata("nothingAs.kt")
public void testNothingAs() {
@@ -6388,6 +6412,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
runTest("compiler/testData/diagnostics/tests/cast/StableTypeForUselessCast.kt");
}
@Test
@TestMetadata("usefulCastInGetOperator.kt")
public void testUsefulCastInGetOperator() {
runTest("compiler/testData/diagnostics/tests/cast/usefulCastInGetOperator.kt");
}
@Test
@TestMetadata("UselessSafeCast.kt")
public void testUselessSafeCast() {
@@ -9296,6 +9326,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
runTest("compiler/testData/diagnostics/tests/dataClasses/conflictingOverloads.kt");
}
@Test
@TestMetadata("copyInDataObject.kt")
public void testCopyInDataObject() {
runTest("compiler/testData/diagnostics/tests/dataClasses/copyInDataObject.kt");
}
@Test
@TestMetadata("copyOfPrivateClass.kt")
public void testCopyOfPrivateClass() {
@@ -13403,6 +13439,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
public void testSimple() {
runTest("compiler/testData/diagnostics/tests/explicitDefinitelyNotNullableViaIntersection/simple.kt");
}
@Test
@TestMetadata("starProjection.kt")
public void testStarProjection() {
runTest("compiler/testData/diagnostics/tests/explicitDefinitelyNotNullableViaIntersection/starProjection.kt");
}
}
@Nested
@@ -15939,6 +15981,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
@TestMetadata("compiler/testData/diagnostics/tests/imports")
@TestDataPath("$PROJECT_ROOT")
public class Imports {
@Test
@TestMetadata("aliasedImportOfEnumConstructor.kt")
public void testAliasedImportOfEnumConstructor() {
runTest("compiler/testData/diagnostics/tests/imports/aliasedImportOfEnumConstructor.kt");
}
@Test
public void testAllFilesPresentInImports() {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/imports"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true, "multiplatform");
@@ -16718,6 +16766,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
runTest("compiler/testData/diagnostics/tests/inference/completionOfMultipleLambdas.kt");
}
@Test
@TestMetadata("complexInferenceOnParentizedExpression.kt")
public void testComplexInferenceOnParentizedExpression() {
runTest("compiler/testData/diagnostics/tests/inference/complexInferenceOnParentizedExpression.kt");
}
@Test
@TestMetadata("conflictingSubstitutions.kt")
public void testConflictingSubstitutions() {
@@ -20523,6 +20577,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
runTest("compiler/testData/diagnostics/tests/inference/reportingImprovements/kt42620.kt");
}
@Test
@TestMetadata("multipleDiagnosticsInOneCallChain.kt")
public void testMultipleDiagnosticsInOneCallChain() {
runTest("compiler/testData/diagnostics/tests/inference/reportingImprovements/multipleDiagnosticsInOneCallChain.kt");
}
@Test
@TestMetadata("NoAmbiguityForDifferentFunctionTypes.kt")
public void testNoAmbiguityForDifferentFunctionTypes() {
@@ -21946,6 +22006,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
runTest("compiler/testData/diagnostics/tests/inner/selfAnnotationForClassObject.kt");
}
@Test
@TestMetadata("starProjectedInnerType.kt")
public void testStarProjectedInnerType() {
runTest("compiler/testData/diagnostics/tests/inner/starProjectedInnerType.kt");
}
@Test
@TestMetadata("traits.kt")
public void testTraits() {
@@ -24265,6 +24331,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
public void testMultipleLabels() {
runTest("compiler/testData/diagnostics/tests/labels/multipleLabels.kt");
}
@Test
@TestMetadata("qualifiedThisInExtensionProperty.kt")
public void testQualifiedThisInExtensionProperty() {
runTest("compiler/testData/diagnostics/tests/labels/qualifiedThisInExtensionProperty.kt");
}
}
@Nested
@@ -26374,6 +26446,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
runTest("compiler/testData/diagnostics/tests/overload/disambiguateByFailedAbstractClassCheck.kt");
}
@Test
@TestMetadata("disambiguateByNumberOfLambdaArgument.kt")
public void testDisambiguateByNumberOfLambdaArgument() {
runTest("compiler/testData/diagnostics/tests/overload/disambiguateByNumberOfLambdaArgument.kt");
}
@Test
@TestMetadata("doubleWinsOverFloat.kt")
public void testDoubleWinsOverFloat() {
@@ -29996,6 +30074,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
runTest("compiler/testData/diagnostics/tests/resolve/anonymousObjectFromTopLevelMember.kt");
}
@Test
@TestMetadata("callToProtectedOnSmartcast.kt")
public void testCallToProtectedOnSmartcast() {
runTest("compiler/testData/diagnostics/tests/resolve/callToProtectedOnSmartcast.kt");
}
@Test
@TestMetadata("callableReferenceInCST.kt")
public void testCallableReferenceInCST() {
@@ -33756,6 +33840,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
runTest("compiler/testData/diagnostics/tests/smartCasts/smartCastWithOrFalse.kt");
}
@Test
@TestMetadata("smartcastBetweenClassAndTypeParameter.kt")
public void testSmartcastBetweenClassAndTypeParameter() {
runTest("compiler/testData/diagnostics/tests/smartCasts/smartcastBetweenClassAndTypeParameter.kt");
}
@Test
@TestMetadata("smartcastInFriendModule.kt")
public void testSmartcastInFriendModule() {
@@ -33792,6 +33882,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
runTest("compiler/testData/diagnostics/tests/smartCasts/smartcastToStarProjection.kt");
}
@Test
@TestMetadata("syntheticAccessorOnSmartcastedReceiver.kt")
public void testSyntheticAccessorOnSmartcastedReceiver() {
runTest("compiler/testData/diagnostics/tests/smartCasts/syntheticAccessorOnSmartcastedReceiver.kt");
}
@Test
@TestMetadata("thisWithLabel.kt")
public void testThisWithLabel() {
@@ -35115,6 +35211,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
runTest("compiler/testData/diagnostics/tests/smartCasts/variables/propertyNotNeeded.kt");
}
@Test
@TestMetadata("propertyOfLocalClass.kt")
public void testPropertyOfLocalClass() {
runTest("compiler/testData/diagnostics/tests/smartCasts/variables/propertyOfLocalClass.kt");
}
@Test
@TestMetadata("propertySubtype.kt")
public void testPropertySubtype() {
@@ -39677,6 +39779,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
runTest("compiler/testData/diagnostics/tests/when/withSubjectVariable/subjectVariableInIsPattern.kt");
}
@Test
@TestMetadata("unnamedSubject.kt")
public void testUnnamedSubject() {
runTest("compiler/testData/diagnostics/tests/when/withSubjectVariable/unnamedSubject.kt");
}
@Test
@TestMetadata("unsupportedFeature.kt")
public void testUnsupportedFeature() {
@@ -41737,6 +41845,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/safecallAndReturnsNull.kt");
}
@Test
@TestMetadata("smartcastOnReceiverInComplexCondition.kt")
public void testSmartcastOnReceiverInComplexCondition() {
runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/smartcastOnReceiverInComplexCondition.kt");
}
@Test
@TestMetadata("throwsEffect.kt")
public void testThrowsEffect() {
@@ -42679,6 +42793,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/allMembersAllowed.kt");
}
@Test
@TestMetadata("callableReference.kt")
public void testCallableReference() {
runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/callableReference.kt");
}
@Test
@TestMetadata("extensions.kt")
public void testExtensions() {
@@ -22643,6 +22643,12 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
runTest("compiler/testData/codegen/box/functions/kt873.kt");
}
@Test
@TestMetadata("lambdaWithTwoContextReceivers.kt")
public void testLambdaWithTwoContextReceivers() {
runTest("compiler/testData/codegen/box/functions/lambdaWithTwoContextReceivers.kt");
}
@Test
@TestMetadata("localFunction.kt")
public void testLocalFunction() {
@@ -23943,6 +23949,12 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
runTest("compiler/testData/codegen/box/inference/referenceToCatchParameterFromLambdaExpression.kt");
}
@Test
@TestMetadata("safeCastWithElvis.kt")
public void testSafeCastWithElvis() {
runTest("compiler/testData/codegen/box/inference/safeCastWithElvis.kt");
}
@Test
@TestMetadata("specialCallsWithCallableReferences.kt")
public void testSpecialCallsWithCallableReferences() {
@@ -36357,6 +36369,12 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/lambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Test
@TestMetadata("ifWithReferenceAndLambda.kt")
public void testIfWithReferenceAndLambda() {
runTest("compiler/testData/codegen/box/lambda/ifWithReferenceAndLambda.kt");
}
@Test
@TestMetadata("lambda1.kt")
public void testLambda1() {
@@ -22643,6 +22643,12 @@ public class FirLightTreeBlackBoxCodegenWithFir2IrFakeOverrideGeneratorTestGener
runTest("compiler/testData/codegen/box/functions/kt873.kt");
}
@Test
@TestMetadata("lambdaWithTwoContextReceivers.kt")
public void testLambdaWithTwoContextReceivers() {
runTest("compiler/testData/codegen/box/functions/lambdaWithTwoContextReceivers.kt");
}
@Test
@TestMetadata("localFunction.kt")
public void testLocalFunction() {
@@ -23943,6 +23949,12 @@ public class FirLightTreeBlackBoxCodegenWithFir2IrFakeOverrideGeneratorTestGener
runTest("compiler/testData/codegen/box/inference/referenceToCatchParameterFromLambdaExpression.kt");
}
@Test
@TestMetadata("safeCastWithElvis.kt")
public void testSafeCastWithElvis() {
runTest("compiler/testData/codegen/box/inference/safeCastWithElvis.kt");
}
@Test
@TestMetadata("specialCallsWithCallableReferences.kt")
public void testSpecialCallsWithCallableReferences() {
@@ -36357,6 +36369,12 @@ public class FirLightTreeBlackBoxCodegenWithFir2IrFakeOverrideGeneratorTestGener
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/lambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Test
@TestMetadata("ifWithReferenceAndLambda.kt")
public void testIfWithReferenceAndLambda() {
runTest("compiler/testData/codegen/box/lambda/ifWithReferenceAndLambda.kt");
}
@Test
@TestMetadata("lambda1.kt")
public void testLambda1() {
@@ -22643,6 +22643,12 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
runTest("compiler/testData/codegen/box/functions/kt873.kt");
}
@Test
@TestMetadata("lambdaWithTwoContextReceivers.kt")
public void testLambdaWithTwoContextReceivers() {
runTest("compiler/testData/codegen/box/functions/lambdaWithTwoContextReceivers.kt");
}
@Test
@TestMetadata("localFunction.kt")
public void testLocalFunction() {
@@ -23943,6 +23949,12 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
runTest("compiler/testData/codegen/box/inference/referenceToCatchParameterFromLambdaExpression.kt");
}
@Test
@TestMetadata("safeCastWithElvis.kt")
public void testSafeCastWithElvis() {
runTest("compiler/testData/codegen/box/inference/safeCastWithElvis.kt");
}
@Test
@TestMetadata("specialCallsWithCallableReferences.kt")
public void testSpecialCallsWithCallableReferences() {
@@ -36357,6 +36369,12 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/lambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Test
@TestMetadata("ifWithReferenceAndLambda.kt")
public void testIfWithReferenceAndLambda() {
runTest("compiler/testData/codegen/box/lambda/ifWithReferenceAndLambda.kt");
}
@Test
@TestMetadata("lambda1.kt")
public void testLambda1() {
@@ -4704,6 +4704,12 @@ public class FirLightTreeJvmIrTextTestGenerated extends AbstractFirLightTreeJvmI
runTest("compiler/testData/ir/irText/types/inStarProjectionInReceiverType.kt");
}
@Test
@TestMetadata("inferenceOfDefinitelyNotNullableBoolean.kt")
public void testInferenceOfDefinitelyNotNullableBoolean() {
runTest("compiler/testData/ir/irText/types/inferenceOfDefinitelyNotNullableBoolean.kt");
}
@Test
@TestMetadata("intersectionType1.kt")
public void testIntersectionType1() {
@@ -4704,6 +4704,12 @@ public class FirPsiJvmIrTextTestGenerated extends AbstractFirPsiJvmIrTextTest {
runTest("compiler/testData/ir/irText/types/inStarProjectionInReceiverType.kt");
}
@Test
@TestMetadata("inferenceOfDefinitelyNotNullableBoolean.kt")
public void testInferenceOfDefinitelyNotNullableBoolean() {
runTest("compiler/testData/ir/irText/types/inferenceOfDefinitelyNotNullableBoolean.kt");
}
@Test
@TestMetadata("intersectionType1.kt")
public void testIntersectionType1() {
@@ -0,0 +1,27 @@
// LANGUAGE: +ContextReceivers
// TARGET_BACKEND: JVM_IR
// WITH_STDLIB
// ISSUE: KT-52887
interface SnarkRoute {
context(PageContext)
fun route(route: String, block: context(PageContext, SnarkRoute) () -> Unit)
}
context(PageContext)
fun SnarkRoute.pagesFrom() {
route("") {
get {
}
}
}
data class PageContext(val context: String)
fun SnarkRoute.get(foo: ()-> Unit) {}
fun box(): String {
return "OK"
}
@@ -0,0 +1,10 @@
// WITH_STDLIB
// IGNORE_BACKEND_K1: JS_IR, JS_IR_ES6, WASM, NATIVE
// ISSUE: KT-62806
fun <T: Number> foo(x: Number) = x as? T ?: TODO()
val x: Int? = foo<Int>(1)
fun box(): String {
return if (x == 1) "OK" else "Fail: $x"
}
@@ -0,0 +1,25 @@
// IGNORE_BACKEND_K1: ANY
// WITH_STDLIB
// ISSUE: KT-63258
class MethodReferenceNPE() {
private val singleRef: () -> Unit =
1.let {
if (it == 0) {
{ }
} else {
this@MethodReferenceNPE::myMethod
}
}
private fun myMethod() {}
fun run() {
singleRef()
}
}
fun box(): String {
MethodReferenceNPE().run()
return "OK"
}
@@ -0,0 +1,14 @@
// ISSUE: KT-65844
@RequiresOptIn
annotation class MyOptIn
@MyOptIn
fun foo() {}
@OptIn(markerClass = [MyOptIn::class]) // should be ok
class MyClass {
fun test() {
foo()
}
}
@@ -0,0 +1,14 @@
// ISSUE: KT-65844
@RequiresOptIn
annotation class MyOptIn
@MyOptIn
fun foo() {}
@OptIn(markerClass = [<!OPT_IN_MARKER_CAN_ONLY_BE_USED_AS_ANNOTATION_OR_ARGUMENT_IN_OPT_IN!>MyOptIn<!>::class]) // should be ok
class MyClass {
fun test() {
foo()
}
}
@@ -0,0 +1 @@
java.lang.AssertionError: Recursion detected on input: component2
@@ -0,0 +1,5 @@
// FIR_IDENTICAL
// WITH_STDLIB
// ISSUE: KT-58447
fun @ParameterName(<!UNRESOLVED_REFERENCE!>component2<!>) Int.component2() = this + 2
@@ -0,0 +1,10 @@
// ISSUE: KT-33108
// FULL_JDK
import java.util.Optional
open class A
class B : A()
fun useOptional(): A {
return Optional.of(0).map { B() as A }.orElse(A())
}
@@ -0,0 +1,10 @@
// ISSUE: KT-33108
// FULL_JDK
import java.util.Optional
open class A
class B : A()
fun useOptional(): A {
return Optional.of(0).map { B() <!USELESS_CAST!>as A<!> }.orElse(A())
}
@@ -0,0 +1,15 @@
// ISSUE: KT-23873
// WITH_STDLIB
data class Holder<T>(val data: T)
val data: Map<Holder<Holder<*>>, Int> = null!!
val test = Holder(Holder(1))
fun test_1() {
data.get(test as Holder<*>)
}
fun test_2() {
data[test as Holder<*>]
}
@@ -0,0 +1,15 @@
// ISSUE: KT-23873
// WITH_STDLIB
data class Holder<T>(val data: T)
val data: Map<Holder<Holder<*>>, Int> = null!!
val test = Holder(Holder(1))
fun test_1() {
data.get(test as Holder<*>)
}
fun test_2() {
data[test <!USELESS_CAST!>as Holder<*><!>]
}
@@ -0,0 +1,7 @@
// ISSUE: KT-65408
data object CreateBuilder : Builder<CreateBuilder> {
fun foo(): CreateBuilder = <!UNRESOLVED_REFERENCE!>copy<!>() // should be an error
}
interface Builder<T> : Cloneable
@@ -0,0 +1,7 @@
// ISSUE: KT-65408
data object CreateBuilder : Builder<CreateBuilder> {
fun foo(): CreateBuilder = copy() // should be an error
}
interface Builder<T> : Cloneable
@@ -0,0 +1,8 @@
// ISSUE: KT-58751
class Result<out T>
interface Convert<T> {
fun convert(str: String): Result<T & Any>
}
fun Convert<*>.cnv(value: String): Result<Any> = convert(value)
@@ -0,0 +1,8 @@
// ISSUE: KT-58751
class Result<out T>
interface Convert<T> {
fun convert(str: String): Result<T & Any>
}
fun Convert<*>.cnv(value: String): Result<Any> = <!TYPE_MISMATCH!>convert(value)<!>
@@ -0,0 +1,5 @@
// ISSUE: KT-56624
import A as B
enum class A {
E()
}
@@ -0,0 +1,5 @@
// ISSUE: KT-56624
import A as B
enum class A {
E<!UNRESOLVED_REFERENCE!><!>()
}
@@ -0,0 +1,37 @@
// ISSUE: KT-65101
// WITH_STDLIB
interface Context<C: Context<C>>
interface InterfaceA<C: Context<C>>
class ABuilder<C: Context<C>, A: InterfaceA<C>, B: InterfaceA<C>>
operator fun <C, A, B> ABuilder<C, A, B>.invoke(block: B.() -> Unit): Unit
where C: Context<C>,
A: InterfaceA<C>,
B: InterfaceA<C>
= null!!
object ContextImpl : Context<ContextImpl>
object RootA : InterfaceA<ContextImpl>
class AImpl<P: Context<P>> : InterfaceA<P> {
fun foo(): Int = null!!
}
val <C: Context<C>, A: InterfaceA<C>> A.impl get() = ABuilder<C, A, AImpl<C>>()
fun test_1() {
RootA.apply {
(impl) {
foo()
}
}
}
fun test_2() {
RootA.apply {
impl {
foo()
}
}
}
@@ -0,0 +1,37 @@
// ISSUE: KT-65101
// WITH_STDLIB
interface Context<C: Context<C>>
interface InterfaceA<C: Context<C>>
class ABuilder<C: Context<C>, A: InterfaceA<C>, B: InterfaceA<C>>
operator fun <C, A, B> ABuilder<C, A, B>.invoke(block: B.() -> Unit): Unit
where C: Context<C>,
A: InterfaceA<C>,
B: InterfaceA<C>
= null!!
object ContextImpl : Context<ContextImpl>
object RootA : InterfaceA<ContextImpl>
class AImpl<P: Context<P>> : InterfaceA<P> {
fun foo(): Int = null!!
}
val <C: Context<C>, A: InterfaceA<C>> A.impl get() = ABuilder<C, A, AImpl<C>>()
fun test_1() {
RootA.apply {
(impl) {
foo()
}
}
}
fun test_2() {
RootA.apply {
impl {
<!UNRESOLVED_REFERENCE!>foo<!>()
}
}
}
@@ -0,0 +1,10 @@
// ISSUE: KT-66186
// WITH_STDLIB
// FULL_JDK
fun test() {
val list = listOf("asd", "sda")
list.stream()
.filter(String::isNotEmpty)
.<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>collect<!>(<!UNRESOLVED_REFERENCE!>FakeClass<!>.toList())
}
@@ -0,0 +1,10 @@
// ISSUE: KT-66186
// WITH_STDLIB
// FULL_JDK
fun test() {
val list = listOf("asd", "sda")
list.stream()
.filter(String::isNotEmpty)
.<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>collect<!>(<!UNRESOLVED_REFERENCE!>FakeClass<!>.<!DEBUG_INFO_MISSING_UNRESOLVED!>toList<!>())
}
@@ -0,0 +1,10 @@
// ISSUE: KT-63444
class A<D : Any> {
inner class Ainner<DD : D?> {
fun innerFun() {}
}
fun test(w:Ainner<*>) {
w.innerFun()
}
}
@@ -0,0 +1,10 @@
// ISSUE: KT-63444
class A<D : Any> {
inner class Ainner<DD : D?> {
fun innerFun() {}
}
fun test(w:Ainner<*>) {
w.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>innerFun<!>()
}
}
@@ -0,0 +1,15 @@
// WITH_STDLIB
// ISSUE: KT-20617
fun Int.function() = run {
this@function + 1
}
val Int.property1: Int
get() {
return run { this@property1 + 1 }
}
val Int.property2 get() = run {
this@property2 + 1
}
@@ -0,0 +1,15 @@
// WITH_STDLIB
// ISSUE: KT-20617
fun Int.function() = run {
this@function + 1
}
val Int.property1: Int
get() {
return run { this@property1 + 1 }
}
val Int.property2 get() = run {
this<!UNRESOLVED_REFERENCE!>@property2<!> <!DEBUG_INFO_MISSING_UNRESOLVED!>+<!> 1
}
@@ -0,0 +1,15 @@
// WITH_STDLIB
// ISSUE: KT-41013
fun <V, R> Iterable<V>.map(transform: (V) -> R): List<R> {
return this.mapIndexed { i, v -> transform(v) }
}
fun <V, R> Iterable<V>.map(transform: (V, Int) -> R): List<R> {
return this.mapIndexed { i, v -> transform(v, i) }
}
fun main() {
val list = listOf(1, 2, 3)
println(list.map { v -> v })
println(list.map { it })
}
@@ -0,0 +1,15 @@
// WITH_STDLIB
// ISSUE: KT-41013
fun <V, R> Iterable<V>.map(transform: (V) -> R): List<R> {
return this.mapIndexed { i, v -> transform(v) }
}
fun <V, R> Iterable<V>.map(transform: (V, Int) -> R): List<R> {
return this.mapIndexed { i, v -> transform(v, i) }
}
fun main() {
val list = listOf(1, 2, 3)
println(list.map { v -> v })
println(list.<!OVERLOAD_RESOLUTION_AMBIGUITY!>map<!> { <!UNRESOLVED_REFERENCE!>it<!> })
}
@@ -0,0 +1,20 @@
// ISSUE: KT-51827
abstract class A {
abstract protected val a: Any?
open class Nested(override val a: String) : A() {
class B {
fun f(other: A) {
other.a
if (other is Nested) {
other.a.length
}
if (other is C) {
other.a
}
}
}
}
class C(override val a: String): Nested(a)
}
@@ -0,0 +1,20 @@
// ISSUE: KT-51827
abstract class A {
abstract protected val a: Any?
open class Nested(override val a: String) : A() {
class B {
fun f(other: A) {
other.a
if (other is Nested) {
<!DEBUG_INFO_SMARTCAST!>other<!>.a.length
}
if (other is C) {
<!DEBUG_INFO_SMARTCAST!>other<!>.<!INVISIBLE_MEMBER!>a<!>
}
}
}
}
class C(override val a: String): Nested(a)
}
@@ -0,0 +1,16 @@
// FULL_JDK
// WITH_REFLECT
// ISSUE: KT-58814
open class A
class B : A()
class C : A()
fun <T : A> createObj(implementedBy: Class<T>): T {
val obj = when (implementedBy) {
B::class.java -> B()
else -> throw Exception("unsupported class")
}
val castObj = implementedBy.cast(obj)
return castObj // should be OK
}
@@ -0,0 +1,16 @@
// FULL_JDK
// WITH_REFLECT
// ISSUE: KT-58814
open class A
class B : A()
class C : A()
fun <T : A> createObj(implementedBy: Class<T>): T {
val obj = when (implementedBy) {
B::class.java -> B()
else -> throw Exception("unsupported class")
}
val castObj = <!DEBUG_INFO_SMARTCAST!>implementedBy<!>.cast(obj)
return <!TYPE_MISMATCH!>castObj<!> // should be OK
}
@@ -0,0 +1,17 @@
// ISSUE: KT-10879
// FILE: A.java
public interface A {
A getFoo();
}
// FILE: main.kt
interface B : A
interface C : A
fun test(x: A) {
if (x !is C) return
if (x is B) {
x.foo.foo
x.getFoo().foo
}
}
@@ -0,0 +1,17 @@
// ISSUE: KT-10879
// FILE: A.java
public interface A {
A getFoo();
}
// FILE: main.kt
interface B : A
interface C : A
fun test(x: A) {
if (x !is C) return
if (x is B) {
x.<!OVERLOAD_RESOLUTION_AMBIGUITY!>foo<!>.<!DEBUG_INFO_MISSING_UNRESOLVED!>foo<!>
x.getFoo().foo
}
}
@@ -0,0 +1,13 @@
// ISSUE: KT-18055
fun main() {
data class Stat(val link: String? = null)
var stat = Stat()
if (stat.link != null) {
takeString(stat.link)
}
}
fun takeString(link: String) {}
@@ -0,0 +1,13 @@
// ISSUE: KT-18055
fun main() {
data class Stat(val link: String? = null)
var stat = Stat()
if (stat.link != null) {
takeString(<!SMARTCAST_IMPOSSIBLE!>stat.link<!>)
}
}
fun takeString(link: String) {}
@@ -0,0 +1,5 @@
java.lang.IllegalArgumentException: fromIndex(0) > toIndex(-1)
at java.util.ArrayList.subListRangeCheck(ArrayList.java:1016)
at java.util.ArrayList.subList(ArrayList.java:1006)
at org.jetbrains.kotlin.resolve.QualifiedExpressionResolver.quickResolveToPackage(QualifiedExpressionResolver.kt:708)
at org.jetbrains.kotlin.resolve.QualifiedExpressionResolver.resolveToPackageOrClassPrefix(QualifiedExpressionResolver.kt:527)
@@ -0,0 +1,6 @@
// FIR_IDENTICAL
// ISSUE: KT-60597
fun test() {
<!UNRESOLVED_REFERENCE!>`java.lang.Short.TYPE`<!>.getConstructor(TODO())
}
@@ -0,0 +1,4 @@
java.lang.NullPointerException
at org.jetbrains.kotlin.types.expressions.PatternMatchingTypingVisitor$Subject$Variable.makeValueArgument(PatternMatchingTypingVisitor.kt:149)
at org.jetbrains.kotlin.types.expressions.PatternMatchingTypingVisitor$checkWhenCondition$1.visitWhenConditionInRange(PatternMatchingTypingVisitor.kt:509)
at org.jetbrains.kotlin.psi.KtVisitorVoid.visitWhenConditionInRange(KtVisitorVoid.java:1015)
@@ -0,0 +1,8 @@
// FIR_IDENTICAL
// ISSUE: KT-58458
fun box() =
when (val<!SYNTAX!><!> = <!UNRESOLVED_REFERENCE!>x<!>) {
in <!UNRESOLVED_REFERENCE!>y<!> -> ""
else -> ""
}
@@ -0,0 +1,14 @@
// ISSUE: KT-31191
import kotlin.contracts.*
@OptIn(ExperimentalContracts::class)
fun Any.isString(): Boolean {
contract { returns(true) implies (this@isString is String) }
return this is String
}
fun test(x: Any?) {
if (x != null && x.isString()) {
x.length
}
}
@@ -0,0 +1,14 @@
// ISSUE: KT-31191
import kotlin.contracts.*
@OptIn(ExperimentalContracts::class)
fun Any.isString(): Boolean {
contract { returns(true) implies (this@isString is String) }
return this is String
}
fun test(x: Any?) {
if (x != null && <!DEBUG_INFO_SMARTCAST!>x<!>.isString()) {
x.<!UNRESOLVED_REFERENCE!>length<!>
}
}
@@ -0,0 +1,10 @@
// ISSUE: KT-25668
suspend fun SequenceScope<Int>.bar() = yield(1)
fun test() {
val seq = sequence {
val f: suspend SequenceScope<Int>.() -> Unit = SequenceScope<Int>::bar
f()
}
seq.toList()
}
@@ -0,0 +1,10 @@
// ISSUE: KT-25668
suspend fun SequenceScope<Int>.bar() = yield(1)
fun test() {
val seq = sequence {
val f: suspend SequenceScope<Int>.() -> Unit = SequenceScope<Int>::<!ILLEGAL_RESTRICTED_SUSPENDING_FUNCTION_CALL!>bar<!>
f()
}
seq.toList()
}
@@ -0,0 +1,48 @@
FILE fqName:<root> fileName:/test.kt
PROPERTY name:key visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:key type:<root>.A.Key<kotlin.Boolean> visibility:private [final,static]
EXPRESSION_BODY
CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.A.Key' type=<root>.A.Key<kotlin.Boolean> origin=null
<class: T>: kotlin.Boolean
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-key> visibility:public modality:FINAL <> () returnType:<root>.A.Key<kotlin.Boolean>
correspondingProperty: PROPERTY name:key visibility:public modality:FINAL [val]
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-key> (): <root>.A.Key<kotlin.Boolean> declared in <root>'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:key type:<root>.A.Key<kotlin.Boolean> visibility:private [final,static]' type=<root>.A.Key<kotlin.Boolean> origin=null
PROPERTY name:x visibility:public modality:FINAL [delegated,val]
FIELD PROPERTY_DELEGATE name:x$delegate type:kotlin.Lazy<kotlin.Boolean> visibility:private [final,static]
EXPRESSION_BODY
CALL 'public final fun lazy <T> (initializer: kotlin.Function0<T of kotlin.lazy>): kotlin.Lazy<T of kotlin.lazy> declared in kotlin' type=kotlin.Lazy<kotlin.Boolean> origin=null
<T>: kotlin.Boolean
initializer: FUN_EXPR type=kotlin.Function0<kotlin.Boolean> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:kotlin.Boolean
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): kotlin.Boolean declared in <root>.x$delegate'
BLOCK type=kotlin.Boolean origin=ELVIS
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:@[EnhancedNullability] kotlin.Boolean? [val]
CALL 'public open fun get <T> (key: @[EnhancedNullability] <root>.A.Key<@[FlexibleNullability] T of <root>.A.get?>): @[EnhancedNullability] T of <root>.A.get? declared in <root>.A' type=@[EnhancedNullability] kotlin.Boolean? origin=null
<T>: @[FlexibleNullability] kotlin.Boolean?
$this: CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.A' type=<root>.A origin=null
key: CALL 'public final fun <get-key> (): <root>.A.Key<kotlin.Boolean> declared in <root>' type=<root>.A.Key<kotlin.Boolean> origin=GET_PROPERTY
WHEN type=kotlin.Boolean origin=null
BRANCH
if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ
arg0: GET_VAR 'val tmp_0: @[EnhancedNullability] kotlin.Boolean? declared in <root>.x$delegate.<anonymous>' type=@[EnhancedNullability] kotlin.Boolean? origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: CONST Boolean type=kotlin.Boolean value=false
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: GET_VAR 'val tmp_0: @[EnhancedNullability] kotlin.Boolean? declared in <root>.x$delegate.<anonymous>' type=@[EnhancedNullability] kotlin.Boolean? origin=null
FUN DELEGATED_PROPERTY_ACCESSOR name:<get-x> visibility:public modality:FINAL <> () returnType:kotlin.Boolean
correspondingProperty: PROPERTY name:x visibility:public modality:FINAL [delegated,val]
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-x> (): kotlin.Boolean declared in <root>'
CALL 'public final fun getValue <T> (thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>): T of kotlin.getValue declared in kotlin' type=kotlin.Boolean origin=null
<T>: kotlin.Boolean
$receiver: GET_FIELD 'FIELD PROPERTY_DELEGATE name:x$delegate type:kotlin.Lazy<kotlin.Boolean> visibility:private [final,static]' type=kotlin.Lazy<kotlin.Boolean> origin=null
thisRef: CONST Null type=kotlin.Nothing? value=null
property: PROPERTY_REFERENCE 'public final x: kotlin.Boolean' field=null getter='public final fun <get-x> (): kotlin.Boolean declared in <root>' setter=null type=kotlin.reflect.KProperty0<kotlin.Boolean> origin=PROPERTY_REFERENCE_FOR_DELEGATE
FUN name:main visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
CALL 'public final fun println (message: kotlin.Boolean): kotlin.Unit declared in kotlin.io' type=kotlin.Unit origin=null
message: CALL 'public final fun <get-x> (): kotlin.Boolean declared in <root>' type=kotlin.Boolean origin=GET_PROPERTY
@@ -0,0 +1,22 @@
val key: Key<Boolean>
field = Key<Boolean>()
get
val x: Boolean /* by */
field = lazy<Boolean>(initializer = local fun <anonymous>(): Boolean {
return { // BLOCK
val tmp_0: @EnhancedNullability Boolean? = A().get<@FlexibleNullability Boolean?>(key = <get-key>())
when {
EQEQ(arg0 = tmp_0, arg1 = null) -> false
else -> tmp_0
}
}
}
)
get(): Boolean {
return #x$delegate.getValue<Boolean>(thisRef = null, property = ::x)
}
fun main() {
println(message = <get-x>())
}
@@ -0,0 +1,29 @@
// CHECK:
// Mangled name: {}key
// Public signature: /key|1144547298251177939[0]
// Public signature debug description: {}key
val key: Key<Boolean>
// CHECK JVM_IR:
// Mangled name: #<get-key>(){}A.Key<kotlin.Boolean>
// Public signature: /key.<get-key>|-6107443460337397211[0]
// Public signature debug description: <get-key>(){}A.Key<kotlin.Boolean>
get
// CHECK:
// Mangled name: {}x
// Public signature: /x|-8060530855978347579[0]
// Public signature debug description: {}x
val x: Boolean /* by */
// CHECK JVM_IR:
// Mangled name: #<get-x>(){}kotlin.Boolean
// Public signature: /x.<get-x>|1798055433828515329[0]
// Public signature debug description: <get-x>(){}kotlin.Boolean
get(): Boolean
// CHECK JVM_IR:
// Mangled name: #main(){}
// Mangled name for the signature by IR: main(){}
// Mangled name for the signature by Frontend: main(){}%test.kt
// Public signature: /main|-4284757841571462650[0]
// Public signature debug description: main(){}
fun main(): Unit
@@ -0,0 +1,49 @@
FILE fqName:<root> fileName:/test.kt
PROPERTY name:key visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:key type:<root>.A.Key<kotlin.Boolean> visibility:private [final,static]
EXPRESSION_BODY
CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.A.Key' type=<root>.A.Key<kotlin.Boolean> origin=null
<class: T>: @[FlexibleNullability] kotlin.Boolean?
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-key> visibility:public modality:FINAL <> () returnType:<root>.A.Key<kotlin.Boolean>
correspondingProperty: PROPERTY name:key visibility:public modality:FINAL [val]
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-key> (): <root>.A.Key<kotlin.Boolean> declared in <root>'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:key type:<root>.A.Key<kotlin.Boolean> visibility:private [final,static]' type=<root>.A.Key<kotlin.Boolean> origin=null
PROPERTY name:x visibility:public modality:FINAL [delegated,val]
FIELD PROPERTY_DELEGATE name:x$delegate type:kotlin.Lazy<@[EnhancedNullability] kotlin.Boolean> visibility:private [final,static]
EXPRESSION_BODY
CALL 'public final fun lazy <T> (initializer: kotlin.Function0<T of kotlin.lazy>): kotlin.Lazy<T of kotlin.lazy> declared in kotlin' type=kotlin.Lazy<@[EnhancedNullability] kotlin.Boolean> origin=null
<T>: @[EnhancedNullability] kotlin.Boolean
initializer: FUN_EXPR type=kotlin.Function0<@[EnhancedNullability] kotlin.Boolean> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:@[EnhancedNullability] kotlin.Boolean
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): @[EnhancedNullability] kotlin.Boolean declared in <root>.x$delegate'
BLOCK type=@[EnhancedNullability] kotlin.Boolean origin=ELVIS
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:@[EnhancedNullability] kotlin.Boolean? [val]
CALL 'public open fun get <T> (key: @[EnhancedNullability] <root>.A.Key<@[FlexibleNullability] T of <root>.A.get?>): @[EnhancedNullability] T of <root>.A.get? declared in <root>.A' type=@[EnhancedNullability] kotlin.Boolean? origin=null
<T>: @[FlexibleNullability] kotlin.Boolean?
$this: CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.A' type=<root>.A origin=null
key: CALL 'public final fun <get-key> (): <root>.A.Key<kotlin.Boolean> declared in <root>' type=<root>.A.Key<kotlin.Boolean> origin=GET_PROPERTY
WHEN type=@[EnhancedNullability] kotlin.Boolean origin=null
BRANCH
if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ
arg0: GET_VAR 'val tmp_0: @[EnhancedNullability] kotlin.Boolean? declared in <root>.x$delegate.<anonymous>' type=@[EnhancedNullability] kotlin.Boolean? origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: CONST Boolean type=kotlin.Boolean value=false
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: GET_VAR 'val tmp_0: @[EnhancedNullability] kotlin.Boolean? declared in <root>.x$delegate.<anonymous>' type=@[EnhancedNullability] kotlin.Boolean? origin=null
FUN DELEGATED_PROPERTY_ACCESSOR name:<get-x> visibility:public modality:FINAL <> () returnType:@[EnhancedNullability] kotlin.Boolean
correspondingProperty: PROPERTY name:x visibility:public modality:FINAL [delegated,val]
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-x> (): @[EnhancedNullability] kotlin.Boolean declared in <root>'
CALL 'public final fun getValue <T> (thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>): T of kotlin.getValue declared in kotlin' type=@[EnhancedNullability] kotlin.Boolean origin=null
<T>: @[EnhancedNullability] kotlin.Boolean
$receiver: GET_FIELD 'FIELD PROPERTY_DELEGATE name:x$delegate type:kotlin.Lazy<@[EnhancedNullability] kotlin.Boolean> visibility:private [final,static]' type=kotlin.Lazy<@[EnhancedNullability] kotlin.Boolean> origin=null
thisRef: CONST Null type=kotlin.Nothing? value=null
property: PROPERTY_REFERENCE 'public final x: @[EnhancedNullability] kotlin.Boolean' field=null getter='public final fun <get-x> (): @[EnhancedNullability] kotlin.Boolean declared in <root>' setter=null type=kotlin.reflect.KProperty0<@[EnhancedNullability] kotlin.Boolean> origin=PROPERTY_REFERENCE_FOR_DELEGATE
FUN name:main visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
CALL 'public final fun println (message: kotlin.Boolean): kotlin.Unit declared in kotlin.io' type=kotlin.Unit origin=null
message: TYPE_OP type=kotlin.Boolean origin=IMPLICIT_NOTNULL typeOperand=kotlin.Boolean
CALL 'public final fun <get-x> (): @[EnhancedNullability] kotlin.Boolean declared in <root>' type=@[EnhancedNullability] kotlin.Boolean origin=GET_PROPERTY
@@ -0,0 +1,28 @@
// TARGET_BACKEND: JVM_IR
// SEPARATE_SIGNATURE_DUMP_FOR_K2
// ISSUE: KT-53886
// WITH_STDLIB
// FILE: A.java
import org.jetbrains.annotations.*;
public class A {
@Nullable
public <T> T get(@NotNull Key<T> key) {
return null;
}
public static class Key<T> {}
}
// FILE: test.kt
val key = A.Key<Boolean>()
val x by lazy {
A().get(key) ?: false
}
fun main() {
println(x)
}
@@ -0,0 +1,22 @@
val key: Key<Boolean>
field = Key<@FlexibleNullability Boolean?>()
get
val x: @EnhancedNullability Boolean /* by */
field = lazy<@EnhancedNullability Boolean>(initializer = local fun <anonymous>(): @EnhancedNullability Boolean {
return { // BLOCK
val tmp_0: @EnhancedNullability Boolean? = A().get<@FlexibleNullability Boolean?>(key = <get-key>())
when {
EQEQ(arg0 = tmp_0, arg1 = null) -> false
else -> tmp_0
}
}
}
)
get(): @EnhancedNullability Boolean {
return #x$delegate.getValue<@EnhancedNullability Boolean>(thisRef = null, property = ::x)
}
fun main() {
println(message = <get-x>() /*!! Boolean */)
}
@@ -0,0 +1,31 @@
// CHECK:
// Mangled name: {}key
// Public signature: /key|1144547298251177939[0]
// Public signature debug description: {}key
val key: Key<Boolean>
// CHECK JVM_IR:
// Mangled name: #<get-key>(){}A.Key<kotlin.Boolean>
// Public signature: /key.<get-key>|-6107443460337397211[0]
// Public signature debug description: <get-key>(){}A.Key<kotlin.Boolean>
get
// CHECK:
// Mangled name: {}x
// Public signature: /x|-8060530855978347579[0]
// Public signature debug description: {}x
val x: @EnhancedNullability Boolean /* by */
// CHECK JVM_IR:
// Mangled name: #<get-x>(){}kotlin.Boolean{EnhancedNullability}
// Public signature: /x.<get-x>|-384063749268193272[0]
// Public signature debug description: <get-x>(){}kotlin.Boolean{EnhancedNullability}
get(): @EnhancedNullability Boolean
// CHECK JVM_IR:
// Mangled name: #main(){}
// Mangled name for the signature by IR: main(){}
// Mangled name for the signature by Frontend: main(){}%test.kt
// Public signature by IR: /main|-4284757841571462650[0]
// Public signature by IR debug description: main(){}
// Public signature by Frontend: /main|-2141841464851950582[0]
// Public signature by Frontend debug description: main(){}%test.kt
fun main(): Unit
@@ -1605,6 +1605,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
runTest("compiler/testData/diagnostics/tests/Unresolved.kt");
}
@Test
@TestMetadata("unresolvedNameInBackticksInReceiver.kt")
public void testUnresolvedNameInBackticksInReceiver() {
runTest("compiler/testData/diagnostics/tests/unresolvedNameInBackticksInReceiver.kt");
}
@Test
@TestMetadata("UnusedInDestructuring.kt")
public void testUnusedInDestructuring() {
@@ -2316,6 +2322,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
runTest("compiler/testData/diagnostics/tests/annotations/onMultiDeclaration.kt");
}
@Test
@TestMetadata("OptInWithArrayArgument.kt")
public void testOptInWithArrayArgument() {
runTest("compiler/testData/diagnostics/tests/annotations/OptInWithArrayArgument.kt");
}
@Test
@TestMetadata("propagationAnnotationToLocalMemberFunction.kt")
public void testPropagationAnnotationToLocalMemberFunction() {
@@ -2406,6 +2418,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
runTest("compiler/testData/diagnostics/tests/annotations/RecursivelyIncorrectlyAnnotatedParameter.kt");
}
@Test
@TestMetadata("referenceOfAnnotatedFunctionInAnnotation.kt")
public void testReferenceOfAnnotatedFunctionInAnnotation() {
runTest("compiler/testData/diagnostics/tests/annotations/referenceOfAnnotatedFunctionInAnnotation.kt");
}
@Test
@TestMetadata("requireKotlin.kt")
public void testRequireKotlin() {
@@ -6370,6 +6388,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
runTest("compiler/testData/diagnostics/tests/cast/kt614.kt");
}
@Test
@TestMetadata("nonUselessCastInLambda.kt")
public void testNonUselessCastInLambda() {
runTest("compiler/testData/diagnostics/tests/cast/nonUselessCastInLambda.kt");
}
@Test
@TestMetadata("nothingAs.kt")
public void testNothingAs() {
@@ -6388,6 +6412,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
runTest("compiler/testData/diagnostics/tests/cast/StableTypeForUselessCast.kt");
}
@Test
@TestMetadata("usefulCastInGetOperator.kt")
public void testUsefulCastInGetOperator() {
runTest("compiler/testData/diagnostics/tests/cast/usefulCastInGetOperator.kt");
}
@Test
@TestMetadata("UselessSafeCast.kt")
public void testUselessSafeCast() {
@@ -9296,6 +9326,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
runTest("compiler/testData/diagnostics/tests/dataClasses/conflictingOverloads.kt");
}
@Test
@TestMetadata("copyInDataObject.kt")
public void testCopyInDataObject() {
runTest("compiler/testData/diagnostics/tests/dataClasses/copyInDataObject.kt");
}
@Test
@TestMetadata("copyOfPrivateClass.kt")
public void testCopyOfPrivateClass() {
@@ -13403,6 +13439,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
public void testSimple() {
runTest("compiler/testData/diagnostics/tests/explicitDefinitelyNotNullableViaIntersection/simple.kt");
}
@Test
@TestMetadata("starProjection.kt")
public void testStarProjection() {
runTest("compiler/testData/diagnostics/tests/explicitDefinitelyNotNullableViaIntersection/starProjection.kt");
}
}
@Nested
@@ -15939,6 +15981,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
@TestMetadata("compiler/testData/diagnostics/tests/imports")
@TestDataPath("$PROJECT_ROOT")
public class Imports {
@Test
@TestMetadata("aliasedImportOfEnumConstructor.kt")
public void testAliasedImportOfEnumConstructor() {
runTest("compiler/testData/diagnostics/tests/imports/aliasedImportOfEnumConstructor.kt");
}
@Test
public void testAllFilesPresentInImports() {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/imports"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true);
@@ -16718,6 +16766,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
runTest("compiler/testData/diagnostics/tests/inference/completionOfMultipleLambdas.kt");
}
@Test
@TestMetadata("complexInferenceOnParentizedExpression.kt")
public void testComplexInferenceOnParentizedExpression() {
runTest("compiler/testData/diagnostics/tests/inference/complexInferenceOnParentizedExpression.kt");
}
@Test
@TestMetadata("conflictingSubstitutions.kt")
public void testConflictingSubstitutions() {
@@ -20523,6 +20577,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
runTest("compiler/testData/diagnostics/tests/inference/reportingImprovements/kt42620.kt");
}
@Test
@TestMetadata("multipleDiagnosticsInOneCallChain.kt")
public void testMultipleDiagnosticsInOneCallChain() {
runTest("compiler/testData/diagnostics/tests/inference/reportingImprovements/multipleDiagnosticsInOneCallChain.kt");
}
@Test
@TestMetadata("NoAmbiguityForDifferentFunctionTypes.kt")
public void testNoAmbiguityForDifferentFunctionTypes() {
@@ -21946,6 +22006,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
runTest("compiler/testData/diagnostics/tests/inner/selfAnnotationForClassObject.kt");
}
@Test
@TestMetadata("starProjectedInnerType.kt")
public void testStarProjectedInnerType() {
runTest("compiler/testData/diagnostics/tests/inner/starProjectedInnerType.kt");
}
@Test
@TestMetadata("traits.kt")
public void testTraits() {
@@ -24265,6 +24331,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
public void testMultipleLabels() {
runTest("compiler/testData/diagnostics/tests/labels/multipleLabels.kt");
}
@Test
@TestMetadata("qualifiedThisInExtensionProperty.kt")
public void testQualifiedThisInExtensionProperty() {
runTest("compiler/testData/diagnostics/tests/labels/qualifiedThisInExtensionProperty.kt");
}
}
@Nested
@@ -28664,6 +28736,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
runTest("compiler/testData/diagnostics/tests/overload/disambiguateByFailedAbstractClassCheck.kt");
}
@Test
@TestMetadata("disambiguateByNumberOfLambdaArgument.kt")
public void testDisambiguateByNumberOfLambdaArgument() {
runTest("compiler/testData/diagnostics/tests/overload/disambiguateByNumberOfLambdaArgument.kt");
}
@Test
@TestMetadata("doubleWinsOverFloat.kt")
public void testDoubleWinsOverFloat() {
@@ -32286,6 +32364,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
runTest("compiler/testData/diagnostics/tests/resolve/anonymousObjectFromTopLevelMember.kt");
}
@Test
@TestMetadata("callToProtectedOnSmartcast.kt")
public void testCallToProtectedOnSmartcast() {
runTest("compiler/testData/diagnostics/tests/resolve/callToProtectedOnSmartcast.kt");
}
@Test
@TestMetadata("callableReferenceInCST.kt")
public void testCallableReferenceInCST() {
@@ -36046,6 +36130,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
runTest("compiler/testData/diagnostics/tests/smartCasts/smartCastWithOrFalse.kt");
}
@Test
@TestMetadata("smartcastBetweenClassAndTypeParameter.kt")
public void testSmartcastBetweenClassAndTypeParameter() {
runTest("compiler/testData/diagnostics/tests/smartCasts/smartcastBetweenClassAndTypeParameter.kt");
}
@Test
@TestMetadata("smartcastInFriendModule.kt")
public void testSmartcastInFriendModule() {
@@ -36082,6 +36172,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
runTest("compiler/testData/diagnostics/tests/smartCasts/smartcastToStarProjection.kt");
}
@Test
@TestMetadata("syntheticAccessorOnSmartcastedReceiver.kt")
public void testSyntheticAccessorOnSmartcastedReceiver() {
runTest("compiler/testData/diagnostics/tests/smartCasts/syntheticAccessorOnSmartcastedReceiver.kt");
}
@Test
@TestMetadata("thisWithLabel.kt")
public void testThisWithLabel() {
@@ -37405,6 +37501,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
runTest("compiler/testData/diagnostics/tests/smartCasts/variables/propertyNotNeeded.kt");
}
@Test
@TestMetadata("propertyOfLocalClass.kt")
public void testPropertyOfLocalClass() {
runTest("compiler/testData/diagnostics/tests/smartCasts/variables/propertyOfLocalClass.kt");
}
@Test
@TestMetadata("propertySubtype.kt")
public void testPropertySubtype() {
@@ -41967,6 +42069,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
runTest("compiler/testData/diagnostics/tests/when/withSubjectVariable/subjectVariableInIsPattern.kt");
}
@Test
@TestMetadata("unnamedSubject.kt")
public void testUnnamedSubject() {
runTest("compiler/testData/diagnostics/tests/when/withSubjectVariable/unnamedSubject.kt");
}
@Test
@TestMetadata("unsupportedFeature.kt")
public void testUnsupportedFeature() {
@@ -44027,6 +44135,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/safecallAndReturnsNull.kt");
}
@Test
@TestMetadata("smartcastOnReceiverInComplexCondition.kt")
public void testSmartcastOnReceiverInComplexCondition() {
runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/smartcastOnReceiverInComplexCondition.kt");
}
@Test
@TestMetadata("throwsEffect.kt")
public void testThrowsEffect() {
@@ -44969,6 +45083,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/allMembersAllowed.kt");
}
@Test
@TestMetadata("callableReference.kt")
public void testCallableReference() {
runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/callableReference.kt");
}
@Test
@TestMetadata("extensions.kt")
public void testExtensions() {
@@ -22643,6 +22643,12 @@ public class JvmAbiConsistencyTestBoxGenerated extends AbstractJvmAbiConsistency
runTest("compiler/testData/codegen/box/functions/kt873.kt");
}
@Test
@TestMetadata("lambdaWithTwoContextReceivers.kt")
public void testLambdaWithTwoContextReceivers() {
runTest("compiler/testData/codegen/box/functions/lambdaWithTwoContextReceivers.kt");
}
@Test
@TestMetadata("localFunction.kt")
public void testLocalFunction() {
@@ -23943,6 +23949,12 @@ public class JvmAbiConsistencyTestBoxGenerated extends AbstractJvmAbiConsistency
runTest("compiler/testData/codegen/box/inference/referenceToCatchParameterFromLambdaExpression.kt");
}
@Test
@TestMetadata("safeCastWithElvis.kt")
public void testSafeCastWithElvis() {
runTest("compiler/testData/codegen/box/inference/safeCastWithElvis.kt");
}
@Test
@TestMetadata("specialCallsWithCallableReferences.kt")
public void testSpecialCallsWithCallableReferences() {
@@ -36357,6 +36369,12 @@ public class JvmAbiConsistencyTestBoxGenerated extends AbstractJvmAbiConsistency
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/lambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Test
@TestMetadata("ifWithReferenceAndLambda.kt")
public void testIfWithReferenceAndLambda() {
runTest("compiler/testData/codegen/box/lambda/ifWithReferenceAndLambda.kt");
}
@Test
@TestMetadata("lambda1.kt")
public void testLambda1() {
@@ -22719,6 +22719,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/inference/referenceToCatchParameterFromLambdaExpression.kt");
}
@Test
@TestMetadata("safeCastWithElvis.kt")
public void testSafeCastWithElvis() {
runTest("compiler/testData/codegen/box/inference/safeCastWithElvis.kt");
}
@Test
@TestMetadata("specialCallsWithCallableReferences.kt")
public void testSpecialCallsWithCallableReferences() {
@@ -34419,6 +34425,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/lambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@Test
@TestMetadata("ifWithReferenceAndLambda.kt")
public void testIfWithReferenceAndLambda() {
runTest("compiler/testData/codegen/box/lambda/ifWithReferenceAndLambda.kt");
}
@Test
@TestMetadata("lambda1.kt")
public void testLambda1() {
@@ -22643,6 +22643,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
runTest("compiler/testData/codegen/box/functions/kt873.kt");
}
@Test
@TestMetadata("lambdaWithTwoContextReceivers.kt")
public void testLambdaWithTwoContextReceivers() {
runTest("compiler/testData/codegen/box/functions/lambdaWithTwoContextReceivers.kt");
}
@Test
@TestMetadata("localFunction.kt")
public void testLocalFunction() {
@@ -23943,6 +23949,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
runTest("compiler/testData/codegen/box/inference/referenceToCatchParameterFromLambdaExpression.kt");
}
@Test
@TestMetadata("safeCastWithElvis.kt")
public void testSafeCastWithElvis() {
runTest("compiler/testData/codegen/box/inference/safeCastWithElvis.kt");
}
@Test
@TestMetadata("specialCallsWithCallableReferences.kt")
public void testSpecialCallsWithCallableReferences() {
@@ -36357,6 +36369,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/lambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Test
@TestMetadata("ifWithReferenceAndLambda.kt")
public void testIfWithReferenceAndLambda() {
runTest("compiler/testData/codegen/box/lambda/ifWithReferenceAndLambda.kt");
}
@Test
@TestMetadata("lambda1.kt")
public void testLambda1() {
@@ -22643,6 +22643,12 @@ public class IrBlackBoxCodegenWithIrInlinerTestGenerated extends AbstractIrBlack
runTest("compiler/testData/codegen/box/functions/kt873.kt");
}
@Test
@TestMetadata("lambdaWithTwoContextReceivers.kt")
public void testLambdaWithTwoContextReceivers() {
runTest("compiler/testData/codegen/box/functions/lambdaWithTwoContextReceivers.kt");
}
@Test
@TestMetadata("localFunction.kt")
public void testLocalFunction() {
@@ -23943,6 +23949,12 @@ public class IrBlackBoxCodegenWithIrInlinerTestGenerated extends AbstractIrBlack
runTest("compiler/testData/codegen/box/inference/referenceToCatchParameterFromLambdaExpression.kt");
}
@Test
@TestMetadata("safeCastWithElvis.kt")
public void testSafeCastWithElvis() {
runTest("compiler/testData/codegen/box/inference/safeCastWithElvis.kt");
}
@Test
@TestMetadata("specialCallsWithCallableReferences.kt")
public void testSpecialCallsWithCallableReferences() {
@@ -36357,6 +36369,12 @@ public class IrBlackBoxCodegenWithIrInlinerTestGenerated extends AbstractIrBlack
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/lambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Test
@TestMetadata("ifWithReferenceAndLambda.kt")
public void testIfWithReferenceAndLambda() {
runTest("compiler/testData/codegen/box/lambda/ifWithReferenceAndLambda.kt");
}
@Test
@TestMetadata("lambda1.kt")
public void testLambda1() {
@@ -22643,6 +22643,12 @@ public class FirBlackBoxCodegenTestWithInlineScopesGenerated extends AbstractFir
runTest("compiler/testData/codegen/box/functions/kt873.kt");
}
@Test
@TestMetadata("lambdaWithTwoContextReceivers.kt")
public void testLambdaWithTwoContextReceivers() {
runTest("compiler/testData/codegen/box/functions/lambdaWithTwoContextReceivers.kt");
}
@Test
@TestMetadata("localFunction.kt")
public void testLocalFunction() {
@@ -23943,6 +23949,12 @@ public class FirBlackBoxCodegenTestWithInlineScopesGenerated extends AbstractFir
runTest("compiler/testData/codegen/box/inference/referenceToCatchParameterFromLambdaExpression.kt");
}
@Test
@TestMetadata("safeCastWithElvis.kt")
public void testSafeCastWithElvis() {
runTest("compiler/testData/codegen/box/inference/safeCastWithElvis.kt");
}
@Test
@TestMetadata("specialCallsWithCallableReferences.kt")
public void testSpecialCallsWithCallableReferences() {
@@ -36357,6 +36369,12 @@ public class FirBlackBoxCodegenTestWithInlineScopesGenerated extends AbstractFir
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/lambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Test
@TestMetadata("ifWithReferenceAndLambda.kt")
public void testIfWithReferenceAndLambda() {
runTest("compiler/testData/codegen/box/lambda/ifWithReferenceAndLambda.kt");
}
@Test
@TestMetadata("lambda1.kt")
public void testLambda1() {
@@ -4704,6 +4704,12 @@ public class ClassicJvmIrTextTestGenerated extends AbstractClassicJvmIrTextTest
runTest("compiler/testData/ir/irText/types/inStarProjectionInReceiverType.kt");
}
@Test
@TestMetadata("inferenceOfDefinitelyNotNullableBoolean.kt")
public void testInferenceOfDefinitelyNotNullableBoolean() {
runTest("compiler/testData/ir/irText/types/inferenceOfDefinitelyNotNullableBoolean.kt");
}
@Test
@TestMetadata("intersectionType1.kt")
public void testIntersectionType1() {
@@ -18945,6 +18945,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/functions/kt873.kt");
}
@TestMetadata("lambdaWithTwoContextReceivers.kt")
public void testLambdaWithTwoContextReceivers() {
runTest("compiler/testData/codegen/box/functions/lambdaWithTwoContextReceivers.kt");
}
@TestMetadata("localFunction.kt")
public void testLocalFunction() {
runTest("compiler/testData/codegen/box/functions/localFunction.kt");
@@ -20061,6 +20066,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/inference/referenceToCatchParameterFromLambdaExpression.kt");
}
@TestMetadata("safeCastWithElvis.kt")
public void testSafeCastWithElvis() {
runTest("compiler/testData/codegen/box/inference/safeCastWithElvis.kt");
}
@TestMetadata("specialCallsWithCallableReferences.kt")
public void testSpecialCallsWithCallableReferences() {
runTest("compiler/testData/codegen/box/inference/specialCallsWithCallableReferences.kt");
@@ -30962,6 +30972,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/lambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@TestMetadata("ifWithReferenceAndLambda.kt")
public void testIfWithReferenceAndLambda() {
runTest("compiler/testData/codegen/box/lambda/ifWithReferenceAndLambda.kt");
}
@TestMetadata("lambda1.kt")
public void testLambda1() {
runTest("compiler/testData/codegen/box/lambda/lambda1.kt");
@@ -18189,6 +18189,12 @@ public class FirJsCodegenBoxTestGenerated extends AbstractFirJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/inference/referenceToCatchParameterFromLambdaExpression.kt");
}
@Test
@TestMetadata("safeCastWithElvis.kt")
public void testSafeCastWithElvis() {
runTest("compiler/testData/codegen/box/inference/safeCastWithElvis.kt");
}
@Test
@TestMetadata("specialCallsWithCallableReferences.kt")
public void testSpecialCallsWithCallableReferences() {
@@ -25869,6 +25875,12 @@ public class FirJsCodegenBoxTestGenerated extends AbstractFirJsCodegenBoxTest {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/lambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
@Test
@TestMetadata("ifWithReferenceAndLambda.kt")
public void testIfWithReferenceAndLambda() {
runTest("compiler/testData/codegen/box/lambda/ifWithReferenceAndLambda.kt");
}
@Test
@TestMetadata("lambda1.kt")
public void testLambda1() {
@@ -18189,6 +18189,12 @@ public class FirJsES6CodegenBoxTestGenerated extends AbstractFirJsES6CodegenBoxT
runTest("compiler/testData/codegen/box/inference/referenceToCatchParameterFromLambdaExpression.kt");
}
@Test
@TestMetadata("safeCastWithElvis.kt")
public void testSafeCastWithElvis() {
runTest("compiler/testData/codegen/box/inference/safeCastWithElvis.kt");
}
@Test
@TestMetadata("specialCallsWithCallableReferences.kt")
public void testSpecialCallsWithCallableReferences() {
@@ -25869,6 +25875,12 @@ public class FirJsES6CodegenBoxTestGenerated extends AbstractFirJsES6CodegenBoxT
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/lambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
}
@Test
@TestMetadata("ifWithReferenceAndLambda.kt")
public void testIfWithReferenceAndLambda() {
runTest("compiler/testData/codegen/box/lambda/ifWithReferenceAndLambda.kt");
}
@Test
@TestMetadata("lambda1.kt")
public void testLambda1() {
@@ -18189,6 +18189,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/inference/referenceToCatchParameterFromLambdaExpression.kt");
}
@Test
@TestMetadata("safeCastWithElvis.kt")
public void testSafeCastWithElvis() {
runTest("compiler/testData/codegen/box/inference/safeCastWithElvis.kt");
}
@Test
@TestMetadata("specialCallsWithCallableReferences.kt")
public void testSpecialCallsWithCallableReferences() {
@@ -25869,6 +25875,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/lambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
@Test
@TestMetadata("ifWithReferenceAndLambda.kt")
public void testIfWithReferenceAndLambda() {
runTest("compiler/testData/codegen/box/lambda/ifWithReferenceAndLambda.kt");
}
@Test
@TestMetadata("lambda1.kt")
public void testLambda1() {
@@ -18189,6 +18189,12 @@ public class IrJsES6CodegenBoxTestGenerated extends AbstractIrJsES6CodegenBoxTes
runTest("compiler/testData/codegen/box/inference/referenceToCatchParameterFromLambdaExpression.kt");
}
@Test
@TestMetadata("safeCastWithElvis.kt")
public void testSafeCastWithElvis() {
runTest("compiler/testData/codegen/box/inference/safeCastWithElvis.kt");
}
@Test
@TestMetadata("specialCallsWithCallableReferences.kt")
public void testSpecialCallsWithCallableReferences() {
@@ -25869,6 +25875,12 @@ public class IrJsES6CodegenBoxTestGenerated extends AbstractIrJsES6CodegenBoxTes
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/lambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
}
@Test
@TestMetadata("ifWithReferenceAndLambda.kt")
public void testIfWithReferenceAndLambda() {
runTest("compiler/testData/codegen/box/lambda/ifWithReferenceAndLambda.kt");
}
@Test
@TestMetadata("lambda1.kt")
public void testLambda1() {
@@ -19466,6 +19466,12 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe
runTest("compiler/testData/codegen/box/inference/referenceToCatchParameterFromLambdaExpression.kt");
}
@Test
@TestMetadata("safeCastWithElvis.kt")
public void testSafeCastWithElvis() {
runTest("compiler/testData/codegen/box/inference/safeCastWithElvis.kt");
}
@Test
@TestMetadata("specialCallsWithCallableReferences.kt")
public void testSpecialCallsWithCallableReferences() {
@@ -28853,6 +28859,12 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/lambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
}
@Test
@TestMetadata("ifWithReferenceAndLambda.kt")
public void testIfWithReferenceAndLambda() {
runTest("compiler/testData/codegen/box/lambda/ifWithReferenceAndLambda.kt");
}
@Test
@TestMetadata("lambda1.kt")
public void testLambda1() {
@@ -19888,6 +19888,12 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB
runTest("compiler/testData/codegen/box/inference/referenceToCatchParameterFromLambdaExpression.kt");
}
@Test
@TestMetadata("safeCastWithElvis.kt")
public void testSafeCastWithElvis() {
runTest("compiler/testData/codegen/box/inference/safeCastWithElvis.kt");
}
@Test
@TestMetadata("specialCallsWithCallableReferences.kt")
public void testSpecialCallsWithCallableReferences() {
@@ -29479,6 +29485,12 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/lambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
}
@Test
@TestMetadata("ifWithReferenceAndLambda.kt")
public void testIfWithReferenceAndLambda() {
runTest("compiler/testData/codegen/box/lambda/ifWithReferenceAndLambda.kt");
}
@Test
@TestMetadata("lambda1.kt")
public void testLambda1() {
@@ -19044,6 +19044,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest
runTest("compiler/testData/codegen/box/inference/referenceToCatchParameterFromLambdaExpression.kt");
}
@Test
@TestMetadata("safeCastWithElvis.kt")
public void testSafeCastWithElvis() {
runTest("compiler/testData/codegen/box/inference/safeCastWithElvis.kt");
}
@Test
@TestMetadata("specialCallsWithCallableReferences.kt")
public void testSpecialCallsWithCallableReferences() {
@@ -28227,6 +28233,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/lambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
}
@Test
@TestMetadata("ifWithReferenceAndLambda.kt")
public void testIfWithReferenceAndLambda() {
runTest("compiler/testData/codegen/box/lambda/ifWithReferenceAndLambda.kt");
}
@Test
@TestMetadata("lambda1.kt")
public void testLambda1() {
@@ -19467,6 +19467,12 @@ public class NativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenBoxT
runTest("compiler/testData/codegen/box/inference/referenceToCatchParameterFromLambdaExpression.kt");
}
@Test
@TestMetadata("safeCastWithElvis.kt")
public void testSafeCastWithElvis() {
runTest("compiler/testData/codegen/box/inference/safeCastWithElvis.kt");
}
@Test
@TestMetadata("specialCallsWithCallableReferences.kt")
public void testSpecialCallsWithCallableReferences() {
@@ -28854,6 +28860,12 @@ public class NativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenBoxT
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/lambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
}
@Test
@TestMetadata("ifWithReferenceAndLambda.kt")
public void testIfWithReferenceAndLambda() {
runTest("compiler/testData/codegen/box/lambda/ifWithReferenceAndLambda.kt");
}
@Test
@TestMetadata("lambda1.kt")
public void testLambda1() {
@@ -18225,6 +18225,12 @@ public class FirWasmJsCodegenBoxTestGenerated extends AbstractFirWasmJsCodegenBo
runTest("compiler/testData/codegen/box/inference/referenceToCatchParameterFromLambdaExpression.kt");
}
@Test
@TestMetadata("safeCastWithElvis.kt")
public void testSafeCastWithElvis() {
runTest("compiler/testData/codegen/box/inference/safeCastWithElvis.kt");
}
@Test
@TestMetadata("specialCallsWithCallableReferences.kt")
public void testSpecialCallsWithCallableReferences() {
@@ -25839,6 +25845,12 @@ public class FirWasmJsCodegenBoxTestGenerated extends AbstractFirWasmJsCodegenBo
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/lambda"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
}
@Test
@TestMetadata("ifWithReferenceAndLambda.kt")
public void testIfWithReferenceAndLambda() {
runTest("compiler/testData/codegen/box/lambda/ifWithReferenceAndLambda.kt");
}
@Test
@TestMetadata("lambda1.kt")
public void testLambda1() {
@@ -18225,6 +18225,12 @@ public class K1WasmCodegenBoxTestGenerated extends AbstractK1WasmCodegenBoxTest
runTest("compiler/testData/codegen/box/inference/referenceToCatchParameterFromLambdaExpression.kt");
}
@Test
@TestMetadata("safeCastWithElvis.kt")
public void testSafeCastWithElvis() {
runTest("compiler/testData/codegen/box/inference/safeCastWithElvis.kt");
}
@Test
@TestMetadata("specialCallsWithCallableReferences.kt")
public void testSpecialCallsWithCallableReferences() {
@@ -25839,6 +25845,12 @@ public class K1WasmCodegenBoxTestGenerated extends AbstractK1WasmCodegenBoxTest
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/lambda"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
}
@Test
@TestMetadata("ifWithReferenceAndLambda.kt")
public void testIfWithReferenceAndLambda() {
runTest("compiler/testData/codegen/box/lambda/ifWithReferenceAndLambda.kt");
}
@Test
@TestMetadata("lambda1.kt")
public void testLambda1() {