From 6fc56477bf70472790ea3bb82abd421520f6216e Mon Sep 17 00:00:00 2001 From: Ivan Kylchik Date: Mon, 27 Dec 2021 15:54:18 +0300 Subject: [PATCH] Drop all tests that disable features for language version less than 3 --- ...CompilerTestFE10TestdataTestGenerated.java | 284 ----------------- ...irOldFrontendDiagnosticsTestGenerated.java | 284 ----------------- ...DiagnosticsWithLightTreeTestGenerated.java | 284 ----------------- .../FirBlackBoxCodegenTestGenerated.java | 18 -- .../codegen/FirBytecodeTextTestGenerated.java | 30 -- .../codegen/box/constants/kt9532_lv10.kt | 38 --- .../codegen/box/delegation/simple1.0.kt | 27 -- .../box/jdk/streamBackwardCompatibility.kt | 11 - .../bytecodeText/constProperty/noInline.kt | 12 - .../constProperty/noInlineInCmp.kt | 12 - .../noInlineNonStaticJavaField_lv10.kt | 15 - .../lazyCodegen/negateConstantCompare.kt | 14 - .../whenStringOptimization/nonInlinedConst.kt | 16 - .../tests/SingleUnderscoreUnsupported.fir.kt | 27 -- .../tests/SingleUnderscoreUnsupported.kt | 27 -- .../tests/SingleUnderscoreUnsupported.txt | 15 - .../tests/UnusedParametersVersion10.kt | 4 - .../tests/UnusedParametersVersion10.txt | 3 - ...ferenceFeatureForCallableReferences.fir.kt | 67 ---- ...noInferenceFeatureForCallableReferences.kt | 67 ---- ...oInferenceFeatureForCallableReferences.txt | 45 --- ...noArrayLiteralsInAnnotationsFeature.fir.kt | 19 -- .../noArrayLiteralsInAnnotationsFeature.kt | 19 -- .../noArrayLiteralsInAnnotationsFeature.txt | 16 - .../controlFlowAnalysis/unusedInAnonymous.kt | 10 - .../controlFlowAnalysis/unusedInAnonymous.txt | 4 - .../unsupportedOperatorProvideDelegate.fir.kt | 14 - .../unsupportedOperatorProvideDelegate.kt | 14 - .../unsupportedOperatorProvideDelegate.txt | 16 - .../unsupportedFeature.fir.kt | 13 - .../unsupportedFeature.kt | 13 - .../unsupportedFeature.txt | 16 - .../inline/defaultLambdaInlineDisable.fir.kt | 48 --- .../inline/defaultLambdaInlineDisable.kt | 48 --- .../inline/defaultLambdaInlineDisable.txt | 50 --- ...bdaInDefaultInlineParameterDisabled.fir.kt | 60 ---- ...eLambdaInDefaultInlineParameterDisabled.kt | 60 ---- ...LambdaInDefaultInlineParameterDisabled.txt | 16 - .../inline/unsupportedConstruction.fir.kt | 33 -- .../tests/inline/unsupportedConstruction.kt | 33 -- .../tests/inline/unsupportedConstruction.txt | 20 -- .../tests/inner/illegalModifier.kt | 46 --- .../tests/inner/illegalModifier.txt | 159 ---------- .../innerClassInEnumEntryClass_lv11.fir.kt | 19 -- .../inner/innerClassInEnumEntryClass_lv11.kt | 19 -- .../inner/innerClassInEnumEntryClass_lv11.txt | 20 -- .../tests/j+k/defaultMethods_warning.fir.kt | 169 ---------- .../tests/j+k/defaultMethods_warning.kt | 169 ---------- .../tests/j+k/defaultMethods_warning.txt | 75 ----- .../lateinit/modifierApplicability.fir.kt | 71 ----- .../tests/lateinit/modifierApplicability.kt | 71 ----- .../tests/lateinit/modifierApplicability.txt | 70 ----- .../const/noDivisionByZeroFeature.fir.kt | 19 -- .../const/noDivisionByZeroFeature.kt | 19 -- .../const/noDivisionByZeroFeature.txt | 16 - ...precatedModConventionWithoutFeature.fir.kt | 38 --- ...noDeprecatedModConventionWithoutFeature.kt | 38 --- ...oDeprecatedModConventionWithoutFeature.txt | 46 --- .../operatorRem/noOperatorRemFeature.fir.kt | 32 -- .../tests/operatorRem/noOperatorRemFeature.kt | 32 -- .../operatorRem/noOperatorRemFeature.txt | 37 --- ...esolveToModWhenNoOperatorRemFeature.fir.kt | 39 --- .../resolveToModWhenNoOperatorRemFeature.kt | 39 --- .../resolveToModWhenNoOperatorRemFeature.txt | 40 --- .../unsupportedInferenceFromGetters.fir.kt | 70 ----- .../unsupportedInferenceFromGetters.kt | 70 ----- .../dslMarker/unsupportedFeature.fir.kt | 28 -- .../resolve/dslMarker/unsupportedFeature.kt | 28 -- .../resolve/dslMarker/unsupportedFeature.txt | 28 -- .../smartCasts/castchecks/basicOff.fir.kt | 36 --- .../tests/smartCasts/castchecks/basicOff.kt | 36 --- .../tests/smartCasts/castchecks/basicOff.txt | 18 -- .../tests/smartCasts/level_1_0.fir.kt | 52 ---- .../diagnostics/tests/smartCasts/level_1_0.kt | 52 ---- .../tests/smartCasts/level_1_0.txt | 8 - .../safeAccessReceiverNotNull.fir.kt | 153 --------- .../safecalls/safeAccessReceiverNotNull.kt | 153 --------- .../safecalls/safeAccessReceiverNotNull.txt | 82 ----- .../varnotnull/capturedInClosureOff.fir.kt | 15 - .../varnotnull/capturedInClosureOff.kt | 15 - .../varnotnull/capturedInClosureOff.txt | 4 - .../varnotnull/setNullInTryUnsound.fir.kt | 10 - .../varnotnull/setNullInTryUnsound.kt | 10 - .../varnotnull/setNullInTryUnsound.txt | 3 - .../inlineFunctionAlways.kt | 17 - .../inlineFunctionAlways.txt | 13 - .../boundCallableReference.fir.kt | 25 -- .../boundCallableReference.kt | 25 -- .../boundCallableReference.txt | 66 ---- .../boundClassLiteral.fir.kt | 18 -- .../boundClassLiteral.kt | 18 -- .../boundClassLiteral.txt | 50 --- ...edJavaClassLiteralInKClassExtension.fir.kt | 11 - ...lifiedJavaClassLiteralInKClassExtension.kt | 11 - ...ifiedJavaClassLiteralInKClassExtension.txt | 4 - ...JavaClassReferenceInKClassExtension.fir.kt | 10 - ...fiedJavaClassReferenceInKClassExtension.kt | 10 - ...iedJavaClassReferenceInKClassExtension.txt | 4 - .../noCallableReferencesWithEmptyLHS.fir.kt | 28 -- .../noCallableReferencesWithEmptyLHS.kt | 28 -- .../noCallableReferencesWithEmptyLHS.txt | 24 -- .../noDataClassInheritance.fir.kt | 23 -- .../noDataClassInheritance.kt | 23 -- .../noDataClassInheritance.txt | 74 ----- .../noInlineProperty.fir.kt | 11 - .../sourceCompatibility/noInlineProperty.kt | 11 - .../sourceCompatibility/noInlineProperty.txt | 5 - .../noLocalDelegatedProperty.fir.kt | 21 -- .../noLocalDelegatedProperty.kt | 21 -- .../noLocalDelegatedProperty.txt | 11 - .../noLocalDelegatedPropertyInScript.kts | 23 -- .../noLocalDelegatedPropertyInScript.txt | 20 -- ...dResolutionStaticWithoutRefinedSams.fir.kt | 37 --- ...rloadResolutionStaticWithoutRefinedSams.kt | 37 --- ...loadResolutionStaticWithoutRefinedSams.txt | 17 - ...verloadResolutionWithoutRefinedSams.fir.kt | 37 --- .../overloadResolutionWithoutRefinedSams.kt | 37 --- .../overloadResolutionWithoutRefinedSams.txt | 15 - .../typealias/unsupportedTypeAlias.fir.kt | 14 - .../tests/typealias/unsupportedTypeAlias.kt | 14 - .../tests/typealias/unsupportedTypeAlias.txt | 22 -- .../noUnderscores.fir.kt | 9 - .../noUnderscores.kt | 9 - .../noUnderscores.txt | 3 - .../noAssigningArraysToVarargsFeature.fir.kt | 48 --- .../noAssigningArraysToVarargsFeature.kt | 48 --- .../noAssigningArraysToVarargsFeature.txt | 38 --- ...loadsWithGenericsWithoutRefinedSams.fir.kt | 25 -- ...OverloadsWithGenericsWithoutRefinedSams.kt | 25 -- ...verloadsWithGenericsWithoutRefinedSams.txt | 21 -- ...adsWithKtFunctionWithoutRefinedSams.fir.kt | 21 -- ...erloadsWithKtFunctionWithoutRefinedSams.kt | 21 -- ...rloadsWithKtFunctionWithoutRefinedSams.txt | 19 -- .../noDefaultImportOfKotlinComparisons.fir.kt | 3 - .../noDefaultImportOfKotlinComparisons.kt | 3 - .../noDefaultImportOfKotlinComparisons.txt | 3 - .../unsupportedFeature.fir.kt | 65 ---- .../targetedBuiltIns/unsupportedFeature.kt | 65 ---- ...nTypeAliasesInvisibleWithoutFeature.fir.kt | 4 - ...ptionTypeAliasesInvisibleWithoutFeature.kt | 4 - ...tionTypeAliasesInvisibleWithoutFeature.txt | 4 - .../test/runners/DiagnosticTestGenerated.java | 290 ------------------ .../codegen/BlackBoxCodegenTestGenerated.java | 18 -- .../codegen/BytecodeTextTestGenerated.java | 30 -- .../IrBlackBoxCodegenTestGenerated.java | 18 -- .../codegen/IrBytecodeTextTestGenerated.java | 30 -- .../LightAnalysisModeTestGenerated.java | 15 - .../js/test/JsCodegenBoxTestGenerated.java | 6 - .../test/ir/IrJsCodegenBoxTestGenerated.java | 6 - .../IrCodegenBoxWasmTestGenerated.java | 5 - .../blackboxtest/ExternalTestGenerated.java | 6 - 151 files changed, 5673 deletions(-) delete mode 100644 compiler/testData/codegen/box/constants/kt9532_lv10.kt delete mode 100644 compiler/testData/codegen/box/delegation/simple1.0.kt delete mode 100644 compiler/testData/codegen/box/jdk/streamBackwardCompatibility.kt delete mode 100644 compiler/testData/codegen/bytecodeText/constProperty/noInline.kt delete mode 100644 compiler/testData/codegen/bytecodeText/constProperty/noInlineInCmp.kt delete mode 100644 compiler/testData/codegen/bytecodeText/constants/noInlineNonStaticJavaField_lv10.kt delete mode 100644 compiler/testData/codegen/bytecodeText/lazyCodegen/negateConstantCompare.kt delete mode 100644 compiler/testData/codegen/bytecodeText/whenStringOptimization/nonInlinedConst.kt delete mode 100644 compiler/testData/diagnostics/tests/SingleUnderscoreUnsupported.fir.kt delete mode 100644 compiler/testData/diagnostics/tests/SingleUnderscoreUnsupported.kt delete mode 100644 compiler/testData/diagnostics/tests/SingleUnderscoreUnsupported.txt delete mode 100644 compiler/testData/diagnostics/tests/UnusedParametersVersion10.kt delete mode 100644 compiler/testData/diagnostics/tests/UnusedParametersVersion10.txt delete mode 100644 compiler/testData/diagnostics/tests/callableReference/generic/noInferenceFeatureForCallableReferences.fir.kt delete mode 100644 compiler/testData/diagnostics/tests/callableReference/generic/noInferenceFeatureForCallableReferences.kt delete mode 100644 compiler/testData/diagnostics/tests/callableReference/generic/noInferenceFeatureForCallableReferences.txt delete mode 100644 compiler/testData/diagnostics/tests/collectionLiterals/noArrayLiteralsInAnnotationsFeature.fir.kt delete mode 100644 compiler/testData/diagnostics/tests/collectionLiterals/noArrayLiteralsInAnnotationsFeature.kt delete mode 100644 compiler/testData/diagnostics/tests/collectionLiterals/noArrayLiteralsInAnnotationsFeature.txt delete mode 100644 compiler/testData/diagnostics/tests/controlFlowAnalysis/unusedInAnonymous.kt delete mode 100644 compiler/testData/diagnostics/tests/controlFlowAnalysis/unusedInAnonymous.txt delete mode 100644 compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/unsupportedOperatorProvideDelegate.fir.kt delete mode 100644 compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/unsupportedOperatorProvideDelegate.kt delete mode 100644 compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/unsupportedOperatorProvideDelegate.txt delete mode 100644 compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/unsupportedFeature.fir.kt delete mode 100644 compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/unsupportedFeature.kt delete mode 100644 compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/unsupportedFeature.txt delete mode 100644 compiler/testData/diagnostics/tests/inline/defaultLambdaInlineDisable.fir.kt delete mode 100644 compiler/testData/diagnostics/tests/inline/defaultLambdaInlineDisable.kt delete mode 100644 compiler/testData/diagnostics/tests/inline/defaultLambdaInlineDisable.txt delete mode 100644 compiler/testData/diagnostics/tests/inline/inlineLambdaInDefaultInlineParameterDisabled.fir.kt delete mode 100644 compiler/testData/diagnostics/tests/inline/inlineLambdaInDefaultInlineParameterDisabled.kt delete mode 100644 compiler/testData/diagnostics/tests/inline/inlineLambdaInDefaultInlineParameterDisabled.txt delete mode 100644 compiler/testData/diagnostics/tests/inline/unsupportedConstruction.fir.kt delete mode 100644 compiler/testData/diagnostics/tests/inline/unsupportedConstruction.kt delete mode 100644 compiler/testData/diagnostics/tests/inline/unsupportedConstruction.txt delete mode 100644 compiler/testData/diagnostics/tests/inner/illegalModifier.kt delete mode 100644 compiler/testData/diagnostics/tests/inner/illegalModifier.txt delete mode 100644 compiler/testData/diagnostics/tests/inner/innerClassInEnumEntryClass_lv11.fir.kt delete mode 100644 compiler/testData/diagnostics/tests/inner/innerClassInEnumEntryClass_lv11.kt delete mode 100644 compiler/testData/diagnostics/tests/inner/innerClassInEnumEntryClass_lv11.txt delete mode 100644 compiler/testData/diagnostics/tests/j+k/defaultMethods_warning.fir.kt delete mode 100644 compiler/testData/diagnostics/tests/j+k/defaultMethods_warning.kt delete mode 100644 compiler/testData/diagnostics/tests/j+k/defaultMethods_warning.txt delete mode 100644 compiler/testData/diagnostics/tests/lateinit/modifierApplicability.fir.kt delete mode 100644 compiler/testData/diagnostics/tests/lateinit/modifierApplicability.kt delete mode 100644 compiler/testData/diagnostics/tests/lateinit/modifierApplicability.txt delete mode 100644 compiler/testData/diagnostics/tests/modifiers/const/noDivisionByZeroFeature.fir.kt delete mode 100644 compiler/testData/diagnostics/tests/modifiers/const/noDivisionByZeroFeature.kt delete mode 100644 compiler/testData/diagnostics/tests/modifiers/const/noDivisionByZeroFeature.txt delete mode 100644 compiler/testData/diagnostics/tests/operatorRem/noDeprecatedModConventionWithoutFeature.fir.kt delete mode 100644 compiler/testData/diagnostics/tests/operatorRem/noDeprecatedModConventionWithoutFeature.kt delete mode 100644 compiler/testData/diagnostics/tests/operatorRem/noDeprecatedModConventionWithoutFeature.txt delete mode 100644 compiler/testData/diagnostics/tests/operatorRem/noOperatorRemFeature.fir.kt delete mode 100644 compiler/testData/diagnostics/tests/operatorRem/noOperatorRemFeature.kt delete mode 100644 compiler/testData/diagnostics/tests/operatorRem/noOperatorRemFeature.txt delete mode 100644 compiler/testData/diagnostics/tests/operatorRem/resolveToModWhenNoOperatorRemFeature.fir.kt delete mode 100644 compiler/testData/diagnostics/tests/operatorRem/resolveToModWhenNoOperatorRemFeature.kt delete mode 100644 compiler/testData/diagnostics/tests/operatorRem/resolveToModWhenNoOperatorRemFeature.txt delete mode 100644 compiler/testData/diagnostics/tests/properties/inferenceFromGetters/unsupportedInferenceFromGetters.fir.kt delete mode 100644 compiler/testData/diagnostics/tests/properties/inferenceFromGetters/unsupportedInferenceFromGetters.kt delete mode 100644 compiler/testData/diagnostics/tests/resolve/dslMarker/unsupportedFeature.fir.kt delete mode 100644 compiler/testData/diagnostics/tests/resolve/dslMarker/unsupportedFeature.kt delete mode 100644 compiler/testData/diagnostics/tests/resolve/dslMarker/unsupportedFeature.txt delete mode 100644 compiler/testData/diagnostics/tests/smartCasts/castchecks/basicOff.fir.kt delete mode 100644 compiler/testData/diagnostics/tests/smartCasts/castchecks/basicOff.kt delete mode 100644 compiler/testData/diagnostics/tests/smartCasts/castchecks/basicOff.txt delete mode 100644 compiler/testData/diagnostics/tests/smartCasts/level_1_0.fir.kt delete mode 100644 compiler/testData/diagnostics/tests/smartCasts/level_1_0.kt delete mode 100644 compiler/testData/diagnostics/tests/smartCasts/level_1_0.txt delete mode 100644 compiler/testData/diagnostics/tests/smartCasts/safecalls/safeAccessReceiverNotNull.fir.kt delete mode 100644 compiler/testData/diagnostics/tests/smartCasts/safecalls/safeAccessReceiverNotNull.kt delete mode 100644 compiler/testData/diagnostics/tests/smartCasts/safecalls/safeAccessReceiverNotNull.txt delete mode 100644 compiler/testData/diagnostics/tests/smartCasts/varnotnull/capturedInClosureOff.fir.kt delete mode 100644 compiler/testData/diagnostics/tests/smartCasts/varnotnull/capturedInClosureOff.kt delete mode 100644 compiler/testData/diagnostics/tests/smartCasts/varnotnull/capturedInClosureOff.txt delete mode 100644 compiler/testData/diagnostics/tests/smartCasts/varnotnull/setNullInTryUnsound.fir.kt delete mode 100644 compiler/testData/diagnostics/tests/smartCasts/varnotnull/setNullInTryUnsound.kt delete mode 100644 compiler/testData/diagnostics/tests/smartCasts/varnotnull/setNullInTryUnsound.txt delete mode 100644 compiler/testData/diagnostics/tests/sourceCompatibility/inlineFunctionAlways.kt delete mode 100644 compiler/testData/diagnostics/tests/sourceCompatibility/inlineFunctionAlways.txt delete mode 100644 compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/boundCallableReference.fir.kt delete mode 100644 compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/boundCallableReference.kt delete mode 100644 compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/boundCallableReference.txt delete mode 100644 compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/boundClassLiteral.fir.kt delete mode 100644 compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/boundClassLiteral.kt delete mode 100644 compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/boundClassLiteral.txt delete mode 100644 compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/qualifiedJavaClassLiteralInKClassExtension.fir.kt delete mode 100644 compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/qualifiedJavaClassLiteralInKClassExtension.kt delete mode 100644 compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/qualifiedJavaClassLiteralInKClassExtension.txt delete mode 100644 compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/qualifiedJavaClassReferenceInKClassExtension.fir.kt delete mode 100644 compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/qualifiedJavaClassReferenceInKClassExtension.kt delete mode 100644 compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/qualifiedJavaClassReferenceInKClassExtension.txt delete mode 100644 compiler/testData/diagnostics/tests/sourceCompatibility/noCallableReferencesWithEmptyLHS.fir.kt delete mode 100644 compiler/testData/diagnostics/tests/sourceCompatibility/noCallableReferencesWithEmptyLHS.kt delete mode 100644 compiler/testData/diagnostics/tests/sourceCompatibility/noCallableReferencesWithEmptyLHS.txt delete mode 100644 compiler/testData/diagnostics/tests/sourceCompatibility/noDataClassInheritance.fir.kt delete mode 100644 compiler/testData/diagnostics/tests/sourceCompatibility/noDataClassInheritance.kt delete mode 100644 compiler/testData/diagnostics/tests/sourceCompatibility/noDataClassInheritance.txt delete mode 100644 compiler/testData/diagnostics/tests/sourceCompatibility/noInlineProperty.fir.kt delete mode 100644 compiler/testData/diagnostics/tests/sourceCompatibility/noInlineProperty.kt delete mode 100644 compiler/testData/diagnostics/tests/sourceCompatibility/noInlineProperty.txt delete mode 100644 compiler/testData/diagnostics/tests/sourceCompatibility/noLocalDelegatedProperty.fir.kt delete mode 100644 compiler/testData/diagnostics/tests/sourceCompatibility/noLocalDelegatedProperty.kt delete mode 100644 compiler/testData/diagnostics/tests/sourceCompatibility/noLocalDelegatedProperty.txt delete mode 100644 compiler/testData/diagnostics/tests/sourceCompatibility/noLocalDelegatedPropertyInScript.kts delete mode 100644 compiler/testData/diagnostics/tests/sourceCompatibility/noLocalDelegatedPropertyInScript.txt delete mode 100644 compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/overloadResolutionStaticWithoutRefinedSams.fir.kt delete mode 100644 compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/overloadResolutionStaticWithoutRefinedSams.kt delete mode 100644 compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/overloadResolutionStaticWithoutRefinedSams.txt delete mode 100644 compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/overloadResolutionWithoutRefinedSams.fir.kt delete mode 100644 compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/overloadResolutionWithoutRefinedSams.kt delete mode 100644 compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/overloadResolutionWithoutRefinedSams.txt delete mode 100644 compiler/testData/diagnostics/tests/typealias/unsupportedTypeAlias.fir.kt delete mode 100644 compiler/testData/diagnostics/tests/typealias/unsupportedTypeAlias.kt delete mode 100644 compiler/testData/diagnostics/tests/typealias/unsupportedTypeAlias.txt delete mode 100644 compiler/testData/diagnostics/tests/underscoresInNumericLiterals/noUnderscores.fir.kt delete mode 100644 compiler/testData/diagnostics/tests/underscoresInNumericLiterals/noUnderscores.kt delete mode 100644 compiler/testData/diagnostics/tests/underscoresInNumericLiterals/noUnderscores.txt delete mode 100644 compiler/testData/diagnostics/tests/varargs/noAssigningArraysToVarargsFeature.fir.kt delete mode 100644 compiler/testData/diagnostics/tests/varargs/noAssigningArraysToVarargsFeature.kt delete mode 100644 compiler/testData/diagnostics/tests/varargs/noAssigningArraysToVarargsFeature.txt delete mode 100644 compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithGenericsWithoutRefinedSams.fir.kt delete mode 100644 compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithGenericsWithoutRefinedSams.kt delete mode 100644 compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithGenericsWithoutRefinedSams.txt delete mode 100644 compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithKtFunctionWithoutRefinedSams.fir.kt delete mode 100644 compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithKtFunctionWithoutRefinedSams.kt delete mode 100644 compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithKtFunctionWithoutRefinedSams.txt delete mode 100644 compiler/testData/diagnostics/testsWithStdLib/sourceCompatibility/noDefaultImportOfKotlinComparisons.fir.kt delete mode 100644 compiler/testData/diagnostics/testsWithStdLib/sourceCompatibility/noDefaultImportOfKotlinComparisons.kt delete mode 100644 compiler/testData/diagnostics/testsWithStdLib/sourceCompatibility/noDefaultImportOfKotlinComparisons.txt delete mode 100644 compiler/testData/diagnostics/testsWithStdLib/targetedBuiltIns/unsupportedFeature.fir.kt delete mode 100644 compiler/testData/diagnostics/testsWithStdLib/targetedBuiltIns/unsupportedFeature.kt delete mode 100644 compiler/testData/diagnostics/testsWithStdLib/typealias/exceptionTypeAliasesInvisibleWithoutFeature.fir.kt delete mode 100644 compiler/testData/diagnostics/testsWithStdLib/typealias/exceptionTypeAliasesInvisibleWithoutFeature.kt delete mode 100644 compiler/testData/diagnostics/testsWithStdLib/typealias/exceptionTypeAliasesInvisibleWithoutFeature.txt diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosisCompilerTestFE10TestdataTestGenerated.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosisCompilerTestFE10TestdataTestGenerated.java index 0ce25c13cf0..a5df7e16a79 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosisCompilerTestFE10TestdataTestGenerated.java +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosisCompilerTestFE10TestdataTestGenerated.java @@ -746,12 +746,6 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag runTest("compiler/testData/diagnostics/tests/ShiftFunctionTypes.kt"); } - @Test - @TestMetadata("SingleUnderscoreUnsupported.kt") - public void testSingleUnderscoreUnsupported() throws Exception { - runTest("compiler/testData/diagnostics/tests/SingleUnderscoreUnsupported.kt"); - } - @Test @TestMetadata("StarsInFunctionCalls.kt") public void testStarsInFunctionCalls() throws Exception { @@ -944,12 +938,6 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag runTest("compiler/testData/diagnostics/tests/UnusedParameters.kt"); } - @Test - @TestMetadata("UnusedParametersVersion10.kt") - public void testUnusedParametersVersion10() throws Exception { - runTest("compiler/testData/diagnostics/tests/UnusedParametersVersion10.kt"); - } - @Test @TestMetadata("UnusedVariables.kt") public void testUnusedVariables() throws Exception { @@ -3436,12 +3424,6 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag runTest("compiler/testData/diagnostics/tests/callableReference/generic/nestedCallWithOverload.kt"); } - @Test - @TestMetadata("noInferenceFeatureForCallableReferences.kt") - public void testNoInferenceFeatureForCallableReferences() throws Exception { - runTest("compiler/testData/diagnostics/tests/callableReference/generic/noInferenceFeatureForCallableReferences.kt"); - } - @Test @TestMetadata("resolutionGenericCallableWithNullableTypes.kt") public void testResolutionGenericCallableWithNullableTypes() throws Exception { @@ -4893,12 +4875,6 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag runTest("compiler/testData/diagnostics/tests/collectionLiterals/defaultValuesWithConstantsInAnnotation.kt"); } - @Test - @TestMetadata("noArrayLiteralsInAnnotationsFeature.kt") - public void testNoArrayLiteralsInAnnotationsFeature() throws Exception { - runTest("compiler/testData/diagnostics/tests/collectionLiterals/noArrayLiteralsInAnnotationsFeature.kt"); - } - @Test @TestMetadata("noCollectionLiterals.kt") public void testNoCollectionLiterals() throws Exception { @@ -5847,12 +5823,6 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/unresolvedReference.kt"); } - @Test - @TestMetadata("unusedInAnonymous.kt") - public void testUnusedInAnonymous() throws Exception { - runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/unusedInAnonymous.kt"); - } - @Test @TestMetadata("useUninitializedInLambda.kt") public void testUseUninitializedInLambda() throws Exception { @@ -8391,12 +8361,6 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag public void testSimpleProvideDelegate() throws Exception { runTest("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/simpleProvideDelegate.kt"); } - - @Test - @TestMetadata("unsupportedOperatorProvideDelegate.kt") - public void testUnsupportedOperatorProvideDelegate() throws Exception { - runTest("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/unsupportedOperatorProvideDelegate.kt"); - } } } @@ -11410,12 +11374,6 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag runTest("compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/underscore.kt"); } - @Test - @TestMetadata("unsupportedFeature.kt") - public void testUnsupportedFeature() throws Exception { - runTest("compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/unsupportedFeature.kt"); - } - @Test @TestMetadata("unusedParameters.kt") public void testUnusedParameters() throws Exception { @@ -16269,12 +16227,6 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag runTest("compiler/testData/diagnostics/tests/inline/default.kt"); } - @Test - @TestMetadata("defaultLambdaInlineDisable.kt") - public void testDefaultLambdaInlineDisable() throws Exception { - runTest("compiler/testData/diagnostics/tests/inline/defaultLambdaInlineDisable.kt"); - } - @Test @TestMetadata("defaultLambdaInlineSuspend.kt") public void testDefaultLambdaInlineSuspend() throws Exception { @@ -16311,12 +16263,6 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag runTest("compiler/testData/diagnostics/tests/inline/inlineLambdaInDefaultInlineParameter.kt"); } - @Test - @TestMetadata("inlineLambdaInDefaultInlineParameterDisabled.kt") - public void testInlineLambdaInDefaultInlineParameterDisabled() throws Exception { - runTest("compiler/testData/diagnostics/tests/inline/inlineLambdaInDefaultInlineParameterDisabled.kt"); - } - @Test @TestMetadata("inlineReified.kt") public void testInlineReified() throws Exception { @@ -16521,12 +16467,6 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag runTest("compiler/testData/diagnostics/tests/inline/superProperty.kt"); } - @Test - @TestMetadata("unsupportedConstruction.kt") - public void testUnsupportedConstruction() throws Exception { - runTest("compiler/testData/diagnostics/tests/inline/unsupportedConstruction.kt"); - } - @Test @TestMetadata("vararg.kt") public void testVararg() throws Exception { @@ -17105,12 +17045,6 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag runTest("compiler/testData/diagnostics/tests/inner/extensionLambdaInsideNestedClass.kt"); } - @Test - @TestMetadata("illegalModifier.kt") - public void testIllegalModifier() throws Exception { - runTest("compiler/testData/diagnostics/tests/inner/illegalModifier.kt"); - } - @Test @TestMetadata("illegalModifier_lv12.kt") public void testIllegalModifier_lv12() throws Exception { @@ -17123,12 +17057,6 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag runTest("compiler/testData/diagnostics/tests/inner/innerClassInEnumEntryClassMemberResolve.kt"); } - @Test - @TestMetadata("innerClassInEnumEntryClass_lv11.kt") - public void testInnerClassInEnumEntryClass_lv11() throws Exception { - runTest("compiler/testData/diagnostics/tests/inner/innerClassInEnumEntryClass_lv11.kt"); - } - @Test @TestMetadata("innerClassInEnumEntryClass_lv12.kt") public void testInnerClassInEnumEntryClass_lv12() throws Exception { @@ -17473,12 +17401,6 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag runTest("compiler/testData/diagnostics/tests/j+k/defaultMethodsIndirectInheritance.kt"); } - @Test - @TestMetadata("defaultMethods_warning.kt") - public void testDefaultMethods_warning() throws Exception { - runTest("compiler/testData/diagnostics/tests/j+k/defaultMethods_warning.kt"); - } - @Test @TestMetadata("differentFilename.kt") public void testDifferentFilename() throws Exception { @@ -19173,12 +19095,6 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/lateinit"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } - @Test - @TestMetadata("modifierApplicability.kt") - public void testModifierApplicability() throws Exception { - runTest("compiler/testData/diagnostics/tests/lateinit/modifierApplicability.kt"); - } - @Test @TestMetadata("modifierApplicability_lv12.kt") public void testModifierApplicability_lv12() throws Exception { @@ -19420,12 +19336,6 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag runTest("compiler/testData/diagnostics/tests/modifiers/const/kt15913.kt"); } - @Test - @TestMetadata("noDivisionByZeroFeature.kt") - public void testNoDivisionByZeroFeature() throws Exception { - runTest("compiler/testData/diagnostics/tests/modifiers/const/noDivisionByZeroFeature.kt"); - } - @Test @TestMetadata("types.kt") public void testTypes() throws Exception { @@ -21361,18 +21271,6 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag runTest("compiler/testData/diagnostics/tests/operatorRem/modWithRemAssign.kt"); } - @Test - @TestMetadata("noDeprecatedModConventionWithoutFeature.kt") - public void testNoDeprecatedModConventionWithoutFeature() throws Exception { - runTest("compiler/testData/diagnostics/tests/operatorRem/noDeprecatedModConventionWithoutFeature.kt"); - } - - @Test - @TestMetadata("noOperatorRemFeature.kt") - public void testNoOperatorRemFeature() throws Exception { - runTest("compiler/testData/diagnostics/tests/operatorRem/noOperatorRemFeature.kt"); - } - @Test @TestMetadata("numberRemConversions.kt") public void testNumberRemConversions() throws Exception { @@ -21444,12 +21342,6 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag public void testResolveModIfRemIsHidden() throws Exception { runTest("compiler/testData/diagnostics/tests/operatorRem/resolveModIfRemIsHidden.kt"); } - - @Test - @TestMetadata("resolveToModWhenNoOperatorRemFeature.kt") - public void testResolveToModWhenNoOperatorRemFeature() throws Exception { - runTest("compiler/testData/diagnostics/tests/operatorRem/resolveToModWhenNoOperatorRemFeature.kt"); - } } @Nested @@ -23296,12 +23188,6 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag runTest("compiler/testData/diagnostics/tests/properties/inferenceFromGetters/topLevel.kt"); } - @Test - @TestMetadata("unsupportedInferenceFromGetters.kt") - public void testUnsupportedInferenceFromGetters() throws Exception { - runTest("compiler/testData/diagnostics/tests/properties/inferenceFromGetters/unsupportedInferenceFromGetters.kt"); - } - @Test @TestMetadata("vars.kt") public void testVars() throws Exception { @@ -25156,12 +25042,6 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag runTest("compiler/testData/diagnostics/tests/resolve/dslMarker/typeAliasToBuiltinFunctionType.kt"); } - @Test - @TestMetadata("unsupportedFeature.kt") - public void testUnsupportedFeature() throws Exception { - runTest("compiler/testData/diagnostics/tests/resolve/dslMarker/unsupportedFeature.kt"); - } - @Test @TestMetadata("useOfExtensions.kt") public void testUseOfExtensions() throws Exception { @@ -27945,12 +27825,6 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag runTest("compiler/testData/diagnostics/tests/smartCasts/lambdaUsesOwnerModifies.kt"); } - @Test - @TestMetadata("level_1_0.kt") - public void testLevel_1_0() throws Exception { - runTest("compiler/testData/diagnostics/tests/smartCasts/level_1_0.kt"); - } - @Test @TestMetadata("localClassChanges.kt") public void testLocalClassChanges() throws Exception { @@ -28248,12 +28122,6 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/smartCasts/castchecks"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } - @Test - @TestMetadata("basicOff.kt") - public void testBasicOff() throws Exception { - runTest("compiler/testData/diagnostics/tests/smartCasts/castchecks/basicOff.kt"); - } - @Test @TestMetadata("basicOn.kt") public void testBasicOn() throws Exception { @@ -29176,12 +29044,6 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/receiverAndChainFalse.kt"); } - @Test - @TestMetadata("safeAccessReceiverNotNull.kt") - public void testSafeAccessReceiverNotNull() throws Exception { - runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/safeAccessReceiverNotNull.kt"); - } - @Test @TestMetadata("safeCallIsAlwaysNullable.kt") public void testSafeCallIsAlwaysNullable() throws Exception { @@ -29424,12 +29286,6 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/capturedInClosureModifiedBefore.kt"); } - @Test - @TestMetadata("capturedInClosureOff.kt") - public void testCapturedInClosureOff() throws Exception { - runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/capturedInClosureOff.kt"); - } - @Test @TestMetadata("doWhileWithBreak.kt") public void testDoWhileWithBreak() throws Exception { @@ -29598,12 +29454,6 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/setNullInTryFinally.kt"); } - @Test - @TestMetadata("setNullInTryUnsound.kt") - public void testSetNullInTryUnsound() throws Exception { - runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/setNullInTryUnsound.kt"); - } - @Test @TestMetadata("setSameInTry.kt") public void testSetSameInTry() throws Exception { @@ -29717,42 +29567,12 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/sourceCompatibility"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } - @Test - @TestMetadata("inlineFunctionAlways.kt") - public void testInlineFunctionAlways() throws Exception { - runTest("compiler/testData/diagnostics/tests/sourceCompatibility/inlineFunctionAlways.kt"); - } - @Test @TestMetadata("noBigFunctionTypes.kt") public void testNoBigFunctionTypes() throws Exception { runTest("compiler/testData/diagnostics/tests/sourceCompatibility/noBigFunctionTypes.kt"); } - @Test - @TestMetadata("noCallableReferencesWithEmptyLHS.kt") - public void testNoCallableReferencesWithEmptyLHS() throws Exception { - runTest("compiler/testData/diagnostics/tests/sourceCompatibility/noCallableReferencesWithEmptyLHS.kt"); - } - - @Test - @TestMetadata("noDataClassInheritance.kt") - public void testNoDataClassInheritance() throws Exception { - runTest("compiler/testData/diagnostics/tests/sourceCompatibility/noDataClassInheritance.kt"); - } - - @Test - @TestMetadata("noInlineProperty.kt") - public void testNoInlineProperty() throws Exception { - runTest("compiler/testData/diagnostics/tests/sourceCompatibility/noInlineProperty.kt"); - } - - @Test - @TestMetadata("noLocalDelegatedProperty.kt") - public void testNoLocalDelegatedProperty() throws Exception { - runTest("compiler/testData/diagnostics/tests/sourceCompatibility/noLocalDelegatedProperty.kt"); - } - @Test @TestMetadata("noMultiplatformProjects.kt") public void testNoMultiplatformProjects() throws Exception { @@ -29834,40 +29654,6 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag runTest("compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion/typealiasesOnImport.kt"); } } - - @Nested - @TestMetadata("compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences") - @TestDataPath("$PROJECT_ROOT") - public class NoBoundCallableReferences { - @Test - public void testAllFilesPresentInNoBoundCallableReferences() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); - } - - @Test - @TestMetadata("boundCallableReference.kt") - public void testBoundCallableReference() throws Exception { - runTest("compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/boundCallableReference.kt"); - } - - @Test - @TestMetadata("boundClassLiteral.kt") - public void testBoundClassLiteral() throws Exception { - runTest("compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/boundClassLiteral.kt"); - } - - @Test - @TestMetadata("qualifiedJavaClassLiteralInKClassExtension.kt") - public void testQualifiedJavaClassLiteralInKClassExtension() throws Exception { - runTest("compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/qualifiedJavaClassLiteralInKClassExtension.kt"); - } - - @Test - @TestMetadata("qualifiedJavaClassReferenceInKClassExtension.kt") - public void testQualifiedJavaClassReferenceInKClassExtension() throws Exception { - runTest("compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/qualifiedJavaClassReferenceInKClassExtension.kt"); - } - } } @Nested @@ -30616,18 +30402,6 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag runTest("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/overloadResolutionStatic.kt"); } - @Test - @TestMetadata("overloadResolutionStaticWithoutRefinedSams.kt") - public void testOverloadResolutionStaticWithoutRefinedSams() throws Exception { - runTest("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/overloadResolutionStaticWithoutRefinedSams.kt"); - } - - @Test - @TestMetadata("overloadResolutionWithoutRefinedSams.kt") - public void testOverloadResolutionWithoutRefinedSams() throws Exception { - runTest("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/overloadResolutionWithoutRefinedSams.kt"); - } - @Test @TestMetadata("PackageLocal.kt") public void testPackageLocal() throws Exception { @@ -31919,12 +31693,6 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag runTest("compiler/testData/diagnostics/tests/typealias/typealiasRhsRepeatedAnnotations.kt"); } - @Test - @TestMetadata("unsupportedTypeAlias.kt") - public void testUnsupportedTypeAlias() throws Exception { - runTest("compiler/testData/diagnostics/tests/typealias/unsupportedTypeAlias.kt"); - } - @Test @TestMetadata("unusedTypeAliasParameter.kt") public void testUnusedTypeAliasParameter() throws Exception { @@ -31952,12 +31720,6 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag public void testIllegalUnderscores() throws Exception { runTest("compiler/testData/diagnostics/tests/underscoresInNumericLiterals/illegalUnderscores.kt"); } - - @Test - @TestMetadata("noUnderscores.kt") - public void testNoUnderscores() throws Exception { - runTest("compiler/testData/diagnostics/tests/underscoresInNumericLiterals/noUnderscores.kt"); - } } @Nested @@ -32457,12 +32219,6 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag runTest("compiler/testData/diagnostics/tests/varargs/NilaryVsVararg.kt"); } - @Test - @TestMetadata("noAssigningArraysToVarargsFeature.kt") - public void testNoAssigningArraysToVarargsFeature() throws Exception { - runTest("compiler/testData/diagnostics/tests/varargs/noAssigningArraysToVarargsFeature.kt"); - } - @Test @TestMetadata("NullableTypeForVarargArgument.kt") public void testNullableTypeForVarargArgument() throws Exception { @@ -37609,24 +37365,12 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag runTest("compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithGenerics.kt"); } - @Test - @TestMetadata("samOverloadsWithGenericsWithoutRefinedSams.kt") - public void testSamOverloadsWithGenericsWithoutRefinedSams() throws Exception { - runTest("compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithGenericsWithoutRefinedSams.kt"); - } - @Test @TestMetadata("samOverloadsWithKtFunction.kt") public void testSamOverloadsWithKtFunction() throws Exception { runTest("compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithKtFunction.kt"); } - @Test - @TestMetadata("samOverloadsWithKtFunctionWithoutRefinedSams.kt") - public void testSamOverloadsWithKtFunctionWithoutRefinedSams() throws Exception { - runTest("compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithKtFunctionWithoutRefinedSams.kt"); - } - @Test @TestMetadata("sameNameClassesFromSupertypes.kt") public void testSameNameClassesFromSupertypes() throws Exception { @@ -37728,22 +37472,6 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag } } - @Nested - @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/sourceCompatibility") - @TestDataPath("$PROJECT_ROOT") - public class SourceCompatibility { - @Test - public void testAllFilesPresentInSourceCompatibility() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/sourceCompatibility"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); - } - - @Test - @TestMetadata("noDefaultImportOfKotlinComparisons.kt") - public void testNoDefaultImportOfKotlinComparisons() throws Exception { - runTest("compiler/testData/diagnostics/testsWithStdLib/sourceCompatibility/noDefaultImportOfKotlinComparisons.kt"); - } - } - @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/targetedBuiltIns") @TestDataPath("$PROJECT_ROOT") @@ -37758,12 +37486,6 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag public void testBlackListed() throws Exception { runTest("compiler/testData/diagnostics/testsWithStdLib/targetedBuiltIns/blackListed.kt"); } - - @Test - @TestMetadata("unsupportedFeature.kt") - public void testUnsupportedFeature() throws Exception { - runTest("compiler/testData/diagnostics/testsWithStdLib/targetedBuiltIns/unsupportedFeature.kt"); - } } @Nested @@ -37945,12 +37667,6 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag runTest("compiler/testData/diagnostics/testsWithStdLib/typealias/exceptionTypeAliasesInvisibleWithApiVersion1_0.kt"); } - @Test - @TestMetadata("exceptionTypeAliasesInvisibleWithoutFeature.kt") - public void testExceptionTypeAliasesInvisibleWithoutFeature() throws Exception { - runTest("compiler/testData/diagnostics/testsWithStdLib/typealias/exceptionTypeAliasesInvisibleWithoutFeature.kt"); - } - @Test @TestMetadata("hashMapTypeAlias.kt") public void testHashMapTypeAlias() throws Exception { diff --git a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsTestGenerated.java b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsTestGenerated.java index e8f5a58fa24..832e0bef8da 100644 --- a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsTestGenerated.java +++ b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsTestGenerated.java @@ -746,12 +746,6 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti runTest("compiler/testData/diagnostics/tests/ShiftFunctionTypes.kt"); } - @Test - @TestMetadata("SingleUnderscoreUnsupported.kt") - public void testSingleUnderscoreUnsupported() throws Exception { - runTest("compiler/testData/diagnostics/tests/SingleUnderscoreUnsupported.kt"); - } - @Test @TestMetadata("StarsInFunctionCalls.kt") public void testStarsInFunctionCalls() throws Exception { @@ -944,12 +938,6 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti runTest("compiler/testData/diagnostics/tests/UnusedParameters.kt"); } - @Test - @TestMetadata("UnusedParametersVersion10.kt") - public void testUnusedParametersVersion10() throws Exception { - runTest("compiler/testData/diagnostics/tests/UnusedParametersVersion10.kt"); - } - @Test @TestMetadata("UnusedVariables.kt") public void testUnusedVariables() throws Exception { @@ -3436,12 +3424,6 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti runTest("compiler/testData/diagnostics/tests/callableReference/generic/nestedCallWithOverload.kt"); } - @Test - @TestMetadata("noInferenceFeatureForCallableReferences.kt") - public void testNoInferenceFeatureForCallableReferences() throws Exception { - runTest("compiler/testData/diagnostics/tests/callableReference/generic/noInferenceFeatureForCallableReferences.kt"); - } - @Test @TestMetadata("resolutionGenericCallableWithNullableTypes.kt") public void testResolutionGenericCallableWithNullableTypes() throws Exception { @@ -4893,12 +4875,6 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti runTest("compiler/testData/diagnostics/tests/collectionLiterals/defaultValuesWithConstantsInAnnotation.kt"); } - @Test - @TestMetadata("noArrayLiteralsInAnnotationsFeature.kt") - public void testNoArrayLiteralsInAnnotationsFeature() throws Exception { - runTest("compiler/testData/diagnostics/tests/collectionLiterals/noArrayLiteralsInAnnotationsFeature.kt"); - } - @Test @TestMetadata("noCollectionLiterals.kt") public void testNoCollectionLiterals() throws Exception { @@ -5847,12 +5823,6 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/unresolvedReference.kt"); } - @Test - @TestMetadata("unusedInAnonymous.kt") - public void testUnusedInAnonymous() throws Exception { - runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/unusedInAnonymous.kt"); - } - @Test @TestMetadata("useUninitializedInLambda.kt") public void testUseUninitializedInLambda() throws Exception { @@ -8391,12 +8361,6 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti public void testSimpleProvideDelegate() throws Exception { runTest("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/simpleProvideDelegate.kt"); } - - @Test - @TestMetadata("unsupportedOperatorProvideDelegate.kt") - public void testUnsupportedOperatorProvideDelegate() throws Exception { - runTest("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/unsupportedOperatorProvideDelegate.kt"); - } } } @@ -11410,12 +11374,6 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti runTest("compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/underscore.kt"); } - @Test - @TestMetadata("unsupportedFeature.kt") - public void testUnsupportedFeature() throws Exception { - runTest("compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/unsupportedFeature.kt"); - } - @Test @TestMetadata("unusedParameters.kt") public void testUnusedParameters() throws Exception { @@ -16269,12 +16227,6 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti runTest("compiler/testData/diagnostics/tests/inline/default.kt"); } - @Test - @TestMetadata("defaultLambdaInlineDisable.kt") - public void testDefaultLambdaInlineDisable() throws Exception { - runTest("compiler/testData/diagnostics/tests/inline/defaultLambdaInlineDisable.kt"); - } - @Test @TestMetadata("defaultLambdaInlineSuspend.kt") public void testDefaultLambdaInlineSuspend() throws Exception { @@ -16311,12 +16263,6 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti runTest("compiler/testData/diagnostics/tests/inline/inlineLambdaInDefaultInlineParameter.kt"); } - @Test - @TestMetadata("inlineLambdaInDefaultInlineParameterDisabled.kt") - public void testInlineLambdaInDefaultInlineParameterDisabled() throws Exception { - runTest("compiler/testData/diagnostics/tests/inline/inlineLambdaInDefaultInlineParameterDisabled.kt"); - } - @Test @TestMetadata("inlineReified.kt") public void testInlineReified() throws Exception { @@ -16521,12 +16467,6 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti runTest("compiler/testData/diagnostics/tests/inline/superProperty.kt"); } - @Test - @TestMetadata("unsupportedConstruction.kt") - public void testUnsupportedConstruction() throws Exception { - runTest("compiler/testData/diagnostics/tests/inline/unsupportedConstruction.kt"); - } - @Test @TestMetadata("vararg.kt") public void testVararg() throws Exception { @@ -17105,12 +17045,6 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti runTest("compiler/testData/diagnostics/tests/inner/extensionLambdaInsideNestedClass.kt"); } - @Test - @TestMetadata("illegalModifier.kt") - public void testIllegalModifier() throws Exception { - runTest("compiler/testData/diagnostics/tests/inner/illegalModifier.kt"); - } - @Test @TestMetadata("illegalModifier_lv12.kt") public void testIllegalModifier_lv12() throws Exception { @@ -17123,12 +17057,6 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti runTest("compiler/testData/diagnostics/tests/inner/innerClassInEnumEntryClassMemberResolve.kt"); } - @Test - @TestMetadata("innerClassInEnumEntryClass_lv11.kt") - public void testInnerClassInEnumEntryClass_lv11() throws Exception { - runTest("compiler/testData/diagnostics/tests/inner/innerClassInEnumEntryClass_lv11.kt"); - } - @Test @TestMetadata("innerClassInEnumEntryClass_lv12.kt") public void testInnerClassInEnumEntryClass_lv12() throws Exception { @@ -17473,12 +17401,6 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti runTest("compiler/testData/diagnostics/tests/j+k/defaultMethodsIndirectInheritance.kt"); } - @Test - @TestMetadata("defaultMethods_warning.kt") - public void testDefaultMethods_warning() throws Exception { - runTest("compiler/testData/diagnostics/tests/j+k/defaultMethods_warning.kt"); - } - @Test @TestMetadata("differentFilename.kt") public void testDifferentFilename() throws Exception { @@ -19173,12 +19095,6 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/lateinit"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } - @Test - @TestMetadata("modifierApplicability.kt") - public void testModifierApplicability() throws Exception { - runTest("compiler/testData/diagnostics/tests/lateinit/modifierApplicability.kt"); - } - @Test @TestMetadata("modifierApplicability_lv12.kt") public void testModifierApplicability_lv12() throws Exception { @@ -19420,12 +19336,6 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti runTest("compiler/testData/diagnostics/tests/modifiers/const/kt15913.kt"); } - @Test - @TestMetadata("noDivisionByZeroFeature.kt") - public void testNoDivisionByZeroFeature() throws Exception { - runTest("compiler/testData/diagnostics/tests/modifiers/const/noDivisionByZeroFeature.kt"); - } - @Test @TestMetadata("types.kt") public void testTypes() throws Exception { @@ -21361,18 +21271,6 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti runTest("compiler/testData/diagnostics/tests/operatorRem/modWithRemAssign.kt"); } - @Test - @TestMetadata("noDeprecatedModConventionWithoutFeature.kt") - public void testNoDeprecatedModConventionWithoutFeature() throws Exception { - runTest("compiler/testData/diagnostics/tests/operatorRem/noDeprecatedModConventionWithoutFeature.kt"); - } - - @Test - @TestMetadata("noOperatorRemFeature.kt") - public void testNoOperatorRemFeature() throws Exception { - runTest("compiler/testData/diagnostics/tests/operatorRem/noOperatorRemFeature.kt"); - } - @Test @TestMetadata("numberRemConversions.kt") public void testNumberRemConversions() throws Exception { @@ -21444,12 +21342,6 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti public void testResolveModIfRemIsHidden() throws Exception { runTest("compiler/testData/diagnostics/tests/operatorRem/resolveModIfRemIsHidden.kt"); } - - @Test - @TestMetadata("resolveToModWhenNoOperatorRemFeature.kt") - public void testResolveToModWhenNoOperatorRemFeature() throws Exception { - runTest("compiler/testData/diagnostics/tests/operatorRem/resolveToModWhenNoOperatorRemFeature.kt"); - } } @Nested @@ -23296,12 +23188,6 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti runTest("compiler/testData/diagnostics/tests/properties/inferenceFromGetters/topLevel.kt"); } - @Test - @TestMetadata("unsupportedInferenceFromGetters.kt") - public void testUnsupportedInferenceFromGetters() throws Exception { - runTest("compiler/testData/diagnostics/tests/properties/inferenceFromGetters/unsupportedInferenceFromGetters.kt"); - } - @Test @TestMetadata("vars.kt") public void testVars() throws Exception { @@ -25156,12 +25042,6 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti runTest("compiler/testData/diagnostics/tests/resolve/dslMarker/typeAliasToBuiltinFunctionType.kt"); } - @Test - @TestMetadata("unsupportedFeature.kt") - public void testUnsupportedFeature() throws Exception { - runTest("compiler/testData/diagnostics/tests/resolve/dslMarker/unsupportedFeature.kt"); - } - @Test @TestMetadata("useOfExtensions.kt") public void testUseOfExtensions() throws Exception { @@ -27945,12 +27825,6 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti runTest("compiler/testData/diagnostics/tests/smartCasts/lambdaUsesOwnerModifies.kt"); } - @Test - @TestMetadata("level_1_0.kt") - public void testLevel_1_0() throws Exception { - runTest("compiler/testData/diagnostics/tests/smartCasts/level_1_0.kt"); - } - @Test @TestMetadata("localClassChanges.kt") public void testLocalClassChanges() throws Exception { @@ -28248,12 +28122,6 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/smartCasts/castchecks"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } - @Test - @TestMetadata("basicOff.kt") - public void testBasicOff() throws Exception { - runTest("compiler/testData/diagnostics/tests/smartCasts/castchecks/basicOff.kt"); - } - @Test @TestMetadata("basicOn.kt") public void testBasicOn() throws Exception { @@ -29176,12 +29044,6 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/receiverAndChainFalse.kt"); } - @Test - @TestMetadata("safeAccessReceiverNotNull.kt") - public void testSafeAccessReceiverNotNull() throws Exception { - runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/safeAccessReceiverNotNull.kt"); - } - @Test @TestMetadata("safeCallIsAlwaysNullable.kt") public void testSafeCallIsAlwaysNullable() throws Exception { @@ -29424,12 +29286,6 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/capturedInClosureModifiedBefore.kt"); } - @Test - @TestMetadata("capturedInClosureOff.kt") - public void testCapturedInClosureOff() throws Exception { - runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/capturedInClosureOff.kt"); - } - @Test @TestMetadata("doWhileWithBreak.kt") public void testDoWhileWithBreak() throws Exception { @@ -29598,12 +29454,6 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/setNullInTryFinally.kt"); } - @Test - @TestMetadata("setNullInTryUnsound.kt") - public void testSetNullInTryUnsound() throws Exception { - runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/setNullInTryUnsound.kt"); - } - @Test @TestMetadata("setSameInTry.kt") public void testSetSameInTry() throws Exception { @@ -29717,42 +29567,12 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/sourceCompatibility"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } - @Test - @TestMetadata("inlineFunctionAlways.kt") - public void testInlineFunctionAlways() throws Exception { - runTest("compiler/testData/diagnostics/tests/sourceCompatibility/inlineFunctionAlways.kt"); - } - @Test @TestMetadata("noBigFunctionTypes.kt") public void testNoBigFunctionTypes() throws Exception { runTest("compiler/testData/diagnostics/tests/sourceCompatibility/noBigFunctionTypes.kt"); } - @Test - @TestMetadata("noCallableReferencesWithEmptyLHS.kt") - public void testNoCallableReferencesWithEmptyLHS() throws Exception { - runTest("compiler/testData/diagnostics/tests/sourceCompatibility/noCallableReferencesWithEmptyLHS.kt"); - } - - @Test - @TestMetadata("noDataClassInheritance.kt") - public void testNoDataClassInheritance() throws Exception { - runTest("compiler/testData/diagnostics/tests/sourceCompatibility/noDataClassInheritance.kt"); - } - - @Test - @TestMetadata("noInlineProperty.kt") - public void testNoInlineProperty() throws Exception { - runTest("compiler/testData/diagnostics/tests/sourceCompatibility/noInlineProperty.kt"); - } - - @Test - @TestMetadata("noLocalDelegatedProperty.kt") - public void testNoLocalDelegatedProperty() throws Exception { - runTest("compiler/testData/diagnostics/tests/sourceCompatibility/noLocalDelegatedProperty.kt"); - } - @Test @TestMetadata("noMultiplatformProjects.kt") public void testNoMultiplatformProjects() throws Exception { @@ -29834,40 +29654,6 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti runTest("compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion/typealiasesOnImport.kt"); } } - - @Nested - @TestMetadata("compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences") - @TestDataPath("$PROJECT_ROOT") - public class NoBoundCallableReferences { - @Test - public void testAllFilesPresentInNoBoundCallableReferences() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); - } - - @Test - @TestMetadata("boundCallableReference.kt") - public void testBoundCallableReference() throws Exception { - runTest("compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/boundCallableReference.kt"); - } - - @Test - @TestMetadata("boundClassLiteral.kt") - public void testBoundClassLiteral() throws Exception { - runTest("compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/boundClassLiteral.kt"); - } - - @Test - @TestMetadata("qualifiedJavaClassLiteralInKClassExtension.kt") - public void testQualifiedJavaClassLiteralInKClassExtension() throws Exception { - runTest("compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/qualifiedJavaClassLiteralInKClassExtension.kt"); - } - - @Test - @TestMetadata("qualifiedJavaClassReferenceInKClassExtension.kt") - public void testQualifiedJavaClassReferenceInKClassExtension() throws Exception { - runTest("compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/qualifiedJavaClassReferenceInKClassExtension.kt"); - } - } } @Nested @@ -30616,18 +30402,6 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti runTest("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/overloadResolutionStatic.kt"); } - @Test - @TestMetadata("overloadResolutionStaticWithoutRefinedSams.kt") - public void testOverloadResolutionStaticWithoutRefinedSams() throws Exception { - runTest("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/overloadResolutionStaticWithoutRefinedSams.kt"); - } - - @Test - @TestMetadata("overloadResolutionWithoutRefinedSams.kt") - public void testOverloadResolutionWithoutRefinedSams() throws Exception { - runTest("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/overloadResolutionWithoutRefinedSams.kt"); - } - @Test @TestMetadata("PackageLocal.kt") public void testPackageLocal() throws Exception { @@ -31919,12 +31693,6 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti runTest("compiler/testData/diagnostics/tests/typealias/typealiasRhsRepeatedAnnotations.kt"); } - @Test - @TestMetadata("unsupportedTypeAlias.kt") - public void testUnsupportedTypeAlias() throws Exception { - runTest("compiler/testData/diagnostics/tests/typealias/unsupportedTypeAlias.kt"); - } - @Test @TestMetadata("unusedTypeAliasParameter.kt") public void testUnusedTypeAliasParameter() throws Exception { @@ -31952,12 +31720,6 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti public void testIllegalUnderscores() throws Exception { runTest("compiler/testData/diagnostics/tests/underscoresInNumericLiterals/illegalUnderscores.kt"); } - - @Test - @TestMetadata("noUnderscores.kt") - public void testNoUnderscores() throws Exception { - runTest("compiler/testData/diagnostics/tests/underscoresInNumericLiterals/noUnderscores.kt"); - } } @Nested @@ -32457,12 +32219,6 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti runTest("compiler/testData/diagnostics/tests/varargs/NilaryVsVararg.kt"); } - @Test - @TestMetadata("noAssigningArraysToVarargsFeature.kt") - public void testNoAssigningArraysToVarargsFeature() throws Exception { - runTest("compiler/testData/diagnostics/tests/varargs/noAssigningArraysToVarargsFeature.kt"); - } - @Test @TestMetadata("NullableTypeForVarargArgument.kt") public void testNullableTypeForVarargArgument() throws Exception { @@ -37673,24 +37429,12 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti runTest("compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithGenerics.kt"); } - @Test - @TestMetadata("samOverloadsWithGenericsWithoutRefinedSams.kt") - public void testSamOverloadsWithGenericsWithoutRefinedSams() throws Exception { - runTest("compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithGenericsWithoutRefinedSams.kt"); - } - @Test @TestMetadata("samOverloadsWithKtFunction.kt") public void testSamOverloadsWithKtFunction() throws Exception { runTest("compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithKtFunction.kt"); } - @Test - @TestMetadata("samOverloadsWithKtFunctionWithoutRefinedSams.kt") - public void testSamOverloadsWithKtFunctionWithoutRefinedSams() throws Exception { - runTest("compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithKtFunctionWithoutRefinedSams.kt"); - } - @Test @TestMetadata("sameNameClassesFromSupertypes.kt") public void testSameNameClassesFromSupertypes() throws Exception { @@ -37792,22 +37536,6 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti } } - @Nested - @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/sourceCompatibility") - @TestDataPath("$PROJECT_ROOT") - public class SourceCompatibility { - @Test - public void testAllFilesPresentInSourceCompatibility() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/sourceCompatibility"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); - } - - @Test - @TestMetadata("noDefaultImportOfKotlinComparisons.kt") - public void testNoDefaultImportOfKotlinComparisons() throws Exception { - runTest("compiler/testData/diagnostics/testsWithStdLib/sourceCompatibility/noDefaultImportOfKotlinComparisons.kt"); - } - } - @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/targetedBuiltIns") @TestDataPath("$PROJECT_ROOT") @@ -37822,12 +37550,6 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti public void testBlackListed() throws Exception { runTest("compiler/testData/diagnostics/testsWithStdLib/targetedBuiltIns/blackListed.kt"); } - - @Test - @TestMetadata("unsupportedFeature.kt") - public void testUnsupportedFeature() throws Exception { - runTest("compiler/testData/diagnostics/testsWithStdLib/targetedBuiltIns/unsupportedFeature.kt"); - } } @Nested @@ -38009,12 +37731,6 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti runTest("compiler/testData/diagnostics/testsWithStdLib/typealias/exceptionTypeAliasesInvisibleWithApiVersion1_0.kt"); } - @Test - @TestMetadata("exceptionTypeAliasesInvisibleWithoutFeature.kt") - public void testExceptionTypeAliasesInvisibleWithoutFeature() throws Exception { - runTest("compiler/testData/diagnostics/testsWithStdLib/typealias/exceptionTypeAliasesInvisibleWithoutFeature.kt"); - } - @Test @TestMetadata("hashMapTypeAlias.kt") public void testHashMapTypeAlias() throws Exception { diff --git a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsWithLightTreeTestGenerated.java b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsWithLightTreeTestGenerated.java index 648a1a5391d..7948ce33211 100644 --- a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsWithLightTreeTestGenerated.java +++ b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsWithLightTreeTestGenerated.java @@ -746,12 +746,6 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac runTest("compiler/testData/diagnostics/tests/ShiftFunctionTypes.kt"); } - @Test - @TestMetadata("SingleUnderscoreUnsupported.kt") - public void testSingleUnderscoreUnsupported() throws Exception { - runTest("compiler/testData/diagnostics/tests/SingleUnderscoreUnsupported.kt"); - } - @Test @TestMetadata("StarsInFunctionCalls.kt") public void testStarsInFunctionCalls() throws Exception { @@ -944,12 +938,6 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac runTest("compiler/testData/diagnostics/tests/UnusedParameters.kt"); } - @Test - @TestMetadata("UnusedParametersVersion10.kt") - public void testUnusedParametersVersion10() throws Exception { - runTest("compiler/testData/diagnostics/tests/UnusedParametersVersion10.kt"); - } - @Test @TestMetadata("UnusedVariables.kt") public void testUnusedVariables() throws Exception { @@ -3436,12 +3424,6 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac runTest("compiler/testData/diagnostics/tests/callableReference/generic/nestedCallWithOverload.kt"); } - @Test - @TestMetadata("noInferenceFeatureForCallableReferences.kt") - public void testNoInferenceFeatureForCallableReferences() throws Exception { - runTest("compiler/testData/diagnostics/tests/callableReference/generic/noInferenceFeatureForCallableReferences.kt"); - } - @Test @TestMetadata("resolutionGenericCallableWithNullableTypes.kt") public void testResolutionGenericCallableWithNullableTypes() throws Exception { @@ -4893,12 +4875,6 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac runTest("compiler/testData/diagnostics/tests/collectionLiterals/defaultValuesWithConstantsInAnnotation.kt"); } - @Test - @TestMetadata("noArrayLiteralsInAnnotationsFeature.kt") - public void testNoArrayLiteralsInAnnotationsFeature() throws Exception { - runTest("compiler/testData/diagnostics/tests/collectionLiterals/noArrayLiteralsInAnnotationsFeature.kt"); - } - @Test @TestMetadata("noCollectionLiterals.kt") public void testNoCollectionLiterals() throws Exception { @@ -5847,12 +5823,6 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/unresolvedReference.kt"); } - @Test - @TestMetadata("unusedInAnonymous.kt") - public void testUnusedInAnonymous() throws Exception { - runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/unusedInAnonymous.kt"); - } - @Test @TestMetadata("useUninitializedInLambda.kt") public void testUseUninitializedInLambda() throws Exception { @@ -8391,12 +8361,6 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac public void testSimpleProvideDelegate() throws Exception { runTest("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/simpleProvideDelegate.kt"); } - - @Test - @TestMetadata("unsupportedOperatorProvideDelegate.kt") - public void testUnsupportedOperatorProvideDelegate() throws Exception { - runTest("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/unsupportedOperatorProvideDelegate.kt"); - } } } @@ -11410,12 +11374,6 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac runTest("compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/underscore.kt"); } - @Test - @TestMetadata("unsupportedFeature.kt") - public void testUnsupportedFeature() throws Exception { - runTest("compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/unsupportedFeature.kt"); - } - @Test @TestMetadata("unusedParameters.kt") public void testUnusedParameters() throws Exception { @@ -16269,12 +16227,6 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac runTest("compiler/testData/diagnostics/tests/inline/default.kt"); } - @Test - @TestMetadata("defaultLambdaInlineDisable.kt") - public void testDefaultLambdaInlineDisable() throws Exception { - runTest("compiler/testData/diagnostics/tests/inline/defaultLambdaInlineDisable.kt"); - } - @Test @TestMetadata("defaultLambdaInlineSuspend.kt") public void testDefaultLambdaInlineSuspend() throws Exception { @@ -16311,12 +16263,6 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac runTest("compiler/testData/diagnostics/tests/inline/inlineLambdaInDefaultInlineParameter.kt"); } - @Test - @TestMetadata("inlineLambdaInDefaultInlineParameterDisabled.kt") - public void testInlineLambdaInDefaultInlineParameterDisabled() throws Exception { - runTest("compiler/testData/diagnostics/tests/inline/inlineLambdaInDefaultInlineParameterDisabled.kt"); - } - @Test @TestMetadata("inlineReified.kt") public void testInlineReified() throws Exception { @@ -16521,12 +16467,6 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac runTest("compiler/testData/diagnostics/tests/inline/superProperty.kt"); } - @Test - @TestMetadata("unsupportedConstruction.kt") - public void testUnsupportedConstruction() throws Exception { - runTest("compiler/testData/diagnostics/tests/inline/unsupportedConstruction.kt"); - } - @Test @TestMetadata("vararg.kt") public void testVararg() throws Exception { @@ -17105,12 +17045,6 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac runTest("compiler/testData/diagnostics/tests/inner/extensionLambdaInsideNestedClass.kt"); } - @Test - @TestMetadata("illegalModifier.kt") - public void testIllegalModifier() throws Exception { - runTest("compiler/testData/diagnostics/tests/inner/illegalModifier.kt"); - } - @Test @TestMetadata("illegalModifier_lv12.kt") public void testIllegalModifier_lv12() throws Exception { @@ -17123,12 +17057,6 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac runTest("compiler/testData/diagnostics/tests/inner/innerClassInEnumEntryClassMemberResolve.kt"); } - @Test - @TestMetadata("innerClassInEnumEntryClass_lv11.kt") - public void testInnerClassInEnumEntryClass_lv11() throws Exception { - runTest("compiler/testData/diagnostics/tests/inner/innerClassInEnumEntryClass_lv11.kt"); - } - @Test @TestMetadata("innerClassInEnumEntryClass_lv12.kt") public void testInnerClassInEnumEntryClass_lv12() throws Exception { @@ -17473,12 +17401,6 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac runTest("compiler/testData/diagnostics/tests/j+k/defaultMethodsIndirectInheritance.kt"); } - @Test - @TestMetadata("defaultMethods_warning.kt") - public void testDefaultMethods_warning() throws Exception { - runTest("compiler/testData/diagnostics/tests/j+k/defaultMethods_warning.kt"); - } - @Test @TestMetadata("differentFilename.kt") public void testDifferentFilename() throws Exception { @@ -19173,12 +19095,6 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/lateinit"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } - @Test - @TestMetadata("modifierApplicability.kt") - public void testModifierApplicability() throws Exception { - runTest("compiler/testData/diagnostics/tests/lateinit/modifierApplicability.kt"); - } - @Test @TestMetadata("modifierApplicability_lv12.kt") public void testModifierApplicability_lv12() throws Exception { @@ -19420,12 +19336,6 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac runTest("compiler/testData/diagnostics/tests/modifiers/const/kt15913.kt"); } - @Test - @TestMetadata("noDivisionByZeroFeature.kt") - public void testNoDivisionByZeroFeature() throws Exception { - runTest("compiler/testData/diagnostics/tests/modifiers/const/noDivisionByZeroFeature.kt"); - } - @Test @TestMetadata("types.kt") public void testTypes() throws Exception { @@ -21361,18 +21271,6 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac runTest("compiler/testData/diagnostics/tests/operatorRem/modWithRemAssign.kt"); } - @Test - @TestMetadata("noDeprecatedModConventionWithoutFeature.kt") - public void testNoDeprecatedModConventionWithoutFeature() throws Exception { - runTest("compiler/testData/diagnostics/tests/operatorRem/noDeprecatedModConventionWithoutFeature.kt"); - } - - @Test - @TestMetadata("noOperatorRemFeature.kt") - public void testNoOperatorRemFeature() throws Exception { - runTest("compiler/testData/diagnostics/tests/operatorRem/noOperatorRemFeature.kt"); - } - @Test @TestMetadata("numberRemConversions.kt") public void testNumberRemConversions() throws Exception { @@ -21444,12 +21342,6 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac public void testResolveModIfRemIsHidden() throws Exception { runTest("compiler/testData/diagnostics/tests/operatorRem/resolveModIfRemIsHidden.kt"); } - - @Test - @TestMetadata("resolveToModWhenNoOperatorRemFeature.kt") - public void testResolveToModWhenNoOperatorRemFeature() throws Exception { - runTest("compiler/testData/diagnostics/tests/operatorRem/resolveToModWhenNoOperatorRemFeature.kt"); - } } @Nested @@ -23296,12 +23188,6 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac runTest("compiler/testData/diagnostics/tests/properties/inferenceFromGetters/topLevel.kt"); } - @Test - @TestMetadata("unsupportedInferenceFromGetters.kt") - public void testUnsupportedInferenceFromGetters() throws Exception { - runTest("compiler/testData/diagnostics/tests/properties/inferenceFromGetters/unsupportedInferenceFromGetters.kt"); - } - @Test @TestMetadata("vars.kt") public void testVars() throws Exception { @@ -25156,12 +25042,6 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac runTest("compiler/testData/diagnostics/tests/resolve/dslMarker/typeAliasToBuiltinFunctionType.kt"); } - @Test - @TestMetadata("unsupportedFeature.kt") - public void testUnsupportedFeature() throws Exception { - runTest("compiler/testData/diagnostics/tests/resolve/dslMarker/unsupportedFeature.kt"); - } - @Test @TestMetadata("useOfExtensions.kt") public void testUseOfExtensions() throws Exception { @@ -27945,12 +27825,6 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac runTest("compiler/testData/diagnostics/tests/smartCasts/lambdaUsesOwnerModifies.kt"); } - @Test - @TestMetadata("level_1_0.kt") - public void testLevel_1_0() throws Exception { - runTest("compiler/testData/diagnostics/tests/smartCasts/level_1_0.kt"); - } - @Test @TestMetadata("localClassChanges.kt") public void testLocalClassChanges() throws Exception { @@ -28248,12 +28122,6 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/smartCasts/castchecks"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } - @Test - @TestMetadata("basicOff.kt") - public void testBasicOff() throws Exception { - runTest("compiler/testData/diagnostics/tests/smartCasts/castchecks/basicOff.kt"); - } - @Test @TestMetadata("basicOn.kt") public void testBasicOn() throws Exception { @@ -29176,12 +29044,6 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/receiverAndChainFalse.kt"); } - @Test - @TestMetadata("safeAccessReceiverNotNull.kt") - public void testSafeAccessReceiverNotNull() throws Exception { - runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/safeAccessReceiverNotNull.kt"); - } - @Test @TestMetadata("safeCallIsAlwaysNullable.kt") public void testSafeCallIsAlwaysNullable() throws Exception { @@ -29424,12 +29286,6 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/capturedInClosureModifiedBefore.kt"); } - @Test - @TestMetadata("capturedInClosureOff.kt") - public void testCapturedInClosureOff() throws Exception { - runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/capturedInClosureOff.kt"); - } - @Test @TestMetadata("doWhileWithBreak.kt") public void testDoWhileWithBreak() throws Exception { @@ -29598,12 +29454,6 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/setNullInTryFinally.kt"); } - @Test - @TestMetadata("setNullInTryUnsound.kt") - public void testSetNullInTryUnsound() throws Exception { - runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/setNullInTryUnsound.kt"); - } - @Test @TestMetadata("setSameInTry.kt") public void testSetSameInTry() throws Exception { @@ -29717,42 +29567,12 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/sourceCompatibility"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } - @Test - @TestMetadata("inlineFunctionAlways.kt") - public void testInlineFunctionAlways() throws Exception { - runTest("compiler/testData/diagnostics/tests/sourceCompatibility/inlineFunctionAlways.kt"); - } - @Test @TestMetadata("noBigFunctionTypes.kt") public void testNoBigFunctionTypes() throws Exception { runTest("compiler/testData/diagnostics/tests/sourceCompatibility/noBigFunctionTypes.kt"); } - @Test - @TestMetadata("noCallableReferencesWithEmptyLHS.kt") - public void testNoCallableReferencesWithEmptyLHS() throws Exception { - runTest("compiler/testData/diagnostics/tests/sourceCompatibility/noCallableReferencesWithEmptyLHS.kt"); - } - - @Test - @TestMetadata("noDataClassInheritance.kt") - public void testNoDataClassInheritance() throws Exception { - runTest("compiler/testData/diagnostics/tests/sourceCompatibility/noDataClassInheritance.kt"); - } - - @Test - @TestMetadata("noInlineProperty.kt") - public void testNoInlineProperty() throws Exception { - runTest("compiler/testData/diagnostics/tests/sourceCompatibility/noInlineProperty.kt"); - } - - @Test - @TestMetadata("noLocalDelegatedProperty.kt") - public void testNoLocalDelegatedProperty() throws Exception { - runTest("compiler/testData/diagnostics/tests/sourceCompatibility/noLocalDelegatedProperty.kt"); - } - @Test @TestMetadata("noMultiplatformProjects.kt") public void testNoMultiplatformProjects() throws Exception { @@ -29834,40 +29654,6 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac runTest("compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion/typealiasesOnImport.kt"); } } - - @Nested - @TestMetadata("compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences") - @TestDataPath("$PROJECT_ROOT") - public class NoBoundCallableReferences { - @Test - public void testAllFilesPresentInNoBoundCallableReferences() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); - } - - @Test - @TestMetadata("boundCallableReference.kt") - public void testBoundCallableReference() throws Exception { - runTest("compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/boundCallableReference.kt"); - } - - @Test - @TestMetadata("boundClassLiteral.kt") - public void testBoundClassLiteral() throws Exception { - runTest("compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/boundClassLiteral.kt"); - } - - @Test - @TestMetadata("qualifiedJavaClassLiteralInKClassExtension.kt") - public void testQualifiedJavaClassLiteralInKClassExtension() throws Exception { - runTest("compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/qualifiedJavaClassLiteralInKClassExtension.kt"); - } - - @Test - @TestMetadata("qualifiedJavaClassReferenceInKClassExtension.kt") - public void testQualifiedJavaClassReferenceInKClassExtension() throws Exception { - runTest("compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/qualifiedJavaClassReferenceInKClassExtension.kt"); - } - } } @Nested @@ -30616,18 +30402,6 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac runTest("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/overloadResolutionStatic.kt"); } - @Test - @TestMetadata("overloadResolutionStaticWithoutRefinedSams.kt") - public void testOverloadResolutionStaticWithoutRefinedSams() throws Exception { - runTest("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/overloadResolutionStaticWithoutRefinedSams.kt"); - } - - @Test - @TestMetadata("overloadResolutionWithoutRefinedSams.kt") - public void testOverloadResolutionWithoutRefinedSams() throws Exception { - runTest("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/overloadResolutionWithoutRefinedSams.kt"); - } - @Test @TestMetadata("PackageLocal.kt") public void testPackageLocal() throws Exception { @@ -31919,12 +31693,6 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac runTest("compiler/testData/diagnostics/tests/typealias/typealiasRhsRepeatedAnnotations.kt"); } - @Test - @TestMetadata("unsupportedTypeAlias.kt") - public void testUnsupportedTypeAlias() throws Exception { - runTest("compiler/testData/diagnostics/tests/typealias/unsupportedTypeAlias.kt"); - } - @Test @TestMetadata("unusedTypeAliasParameter.kt") public void testUnusedTypeAliasParameter() throws Exception { @@ -31952,12 +31720,6 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac public void testIllegalUnderscores() throws Exception { runTest("compiler/testData/diagnostics/tests/underscoresInNumericLiterals/illegalUnderscores.kt"); } - - @Test - @TestMetadata("noUnderscores.kt") - public void testNoUnderscores() throws Exception { - runTest("compiler/testData/diagnostics/tests/underscoresInNumericLiterals/noUnderscores.kt"); - } } @Nested @@ -32457,12 +32219,6 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac runTest("compiler/testData/diagnostics/tests/varargs/NilaryVsVararg.kt"); } - @Test - @TestMetadata("noAssigningArraysToVarargsFeature.kt") - public void testNoAssigningArraysToVarargsFeature() throws Exception { - runTest("compiler/testData/diagnostics/tests/varargs/noAssigningArraysToVarargsFeature.kt"); - } - @Test @TestMetadata("NullableTypeForVarargArgument.kt") public void testNullableTypeForVarargArgument() throws Exception { @@ -37673,24 +37429,12 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac runTest("compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithGenerics.kt"); } - @Test - @TestMetadata("samOverloadsWithGenericsWithoutRefinedSams.kt") - public void testSamOverloadsWithGenericsWithoutRefinedSams() throws Exception { - runTest("compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithGenericsWithoutRefinedSams.kt"); - } - @Test @TestMetadata("samOverloadsWithKtFunction.kt") public void testSamOverloadsWithKtFunction() throws Exception { runTest("compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithKtFunction.kt"); } - @Test - @TestMetadata("samOverloadsWithKtFunctionWithoutRefinedSams.kt") - public void testSamOverloadsWithKtFunctionWithoutRefinedSams() throws Exception { - runTest("compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithKtFunctionWithoutRefinedSams.kt"); - } - @Test @TestMetadata("sameNameClassesFromSupertypes.kt") public void testSameNameClassesFromSupertypes() throws Exception { @@ -37792,22 +37536,6 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac } } - @Nested - @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/sourceCompatibility") - @TestDataPath("$PROJECT_ROOT") - public class SourceCompatibility { - @Test - public void testAllFilesPresentInSourceCompatibility() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/sourceCompatibility"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); - } - - @Test - @TestMetadata("noDefaultImportOfKotlinComparisons.kt") - public void testNoDefaultImportOfKotlinComparisons() throws Exception { - runTest("compiler/testData/diagnostics/testsWithStdLib/sourceCompatibility/noDefaultImportOfKotlinComparisons.kt"); - } - } - @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/targetedBuiltIns") @TestDataPath("$PROJECT_ROOT") @@ -37822,12 +37550,6 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac public void testBlackListed() throws Exception { runTest("compiler/testData/diagnostics/testsWithStdLib/targetedBuiltIns/blackListed.kt"); } - - @Test - @TestMetadata("unsupportedFeature.kt") - public void testUnsupportedFeature() throws Exception { - runTest("compiler/testData/diagnostics/testsWithStdLib/targetedBuiltIns/unsupportedFeature.kt"); - } } @Nested @@ -38009,12 +37731,6 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac runTest("compiler/testData/diagnostics/testsWithStdLib/typealias/exceptionTypeAliasesInvisibleWithApiVersion1_0.kt"); } - @Test - @TestMetadata("exceptionTypeAliasesInvisibleWithoutFeature.kt") - public void testExceptionTypeAliasesInvisibleWithoutFeature() throws Exception { - runTest("compiler/testData/diagnostics/testsWithStdLib/typealias/exceptionTypeAliasesInvisibleWithoutFeature.kt"); - } - @Test @TestMetadata("hashMapTypeAlias.kt") public void testHashMapTypeAlias() throws Exception { diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java index 9ebecfc0496..349ece1fbdd 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java @@ -7991,12 +7991,6 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/constants/kt9532.kt"); } - @Test - @TestMetadata("kt9532_lv10.kt") - public void testKt9532_lv10() throws Exception { - runTest("compiler/testData/codegen/box/constants/kt9532_lv10.kt"); - } - @Test @TestMetadata("long.kt") public void testLong() throws Exception { @@ -14769,12 +14763,6 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/delegation/simple.kt"); } - @Test - @TestMetadata("simple1.0.kt") - public void testSimple1_0() throws Exception { - runTest("compiler/testData/codegen/box/delegation/simple1.0.kt"); - } - @Test @TestMetadata("viaTypeAlias.kt") public void testViaTypeAlias() throws Exception { @@ -27383,12 +27371,6 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/jdk/stream.kt"); } - @Test - @TestMetadata("streamBackwardCompatibility.kt") - public void testStreamBackwardCompatibility() throws Exception { - runTest("compiler/testData/codegen/box/jdk/streamBackwardCompatibility.kt"); - } - @Test @TestMetadata("useStream.kt") public void testUseStream() throws Exception { diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBytecodeTextTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBytecodeTextTestGenerated.java index a198392cc3a..e3f2347b5ec 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBytecodeTextTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBytecodeTextTestGenerated.java @@ -1444,18 +1444,6 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { runTest("compiler/testData/codegen/bytecodeText/constProperty/noAccessorsForPrivateConstants.kt"); } - @Test - @TestMetadata("noInline.kt") - public void testNoInline() throws Exception { - runTest("compiler/testData/codegen/bytecodeText/constProperty/noInline.kt"); - } - - @Test - @TestMetadata("noInlineInCmp.kt") - public void testNoInlineInCmp() throws Exception { - runTest("compiler/testData/codegen/bytecodeText/constProperty/noInlineInCmp.kt"); - } - @Test @TestMetadata("nonConstValHasNoDefaultValue_after.kt") public void testNonConstValHasNoDefaultValue_after() throws Exception { @@ -1566,12 +1554,6 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { runTest("compiler/testData/codegen/bytecodeText/constants/noInlineNonStaticJavaField.kt"); } - @Test - @TestMetadata("noInlineNonStaticJavaField_lv10.kt") - public void testNoInlineNonStaticJavaField_lv10() throws Exception { - runTest("compiler/testData/codegen/bytecodeText/constants/noInlineNonStaticJavaField_lv10.kt"); - } - @Test @TestMetadata("nullableByteAndShort.kt") public void testNullableByteAndShort() throws Exception { @@ -4314,12 +4296,6 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { runTest("compiler/testData/codegen/bytecodeText/lazyCodegen/negateConst.kt"); } - @Test - @TestMetadata("negateConstantCompare.kt") - public void testNegateConstantCompare() throws Exception { - runTest("compiler/testData/codegen/bytecodeText/lazyCodegen/negateConstantCompare.kt"); - } - @Test @TestMetadata("negateObjectComp.kt") public void testNegateObjectComp() throws Exception { @@ -5980,12 +5956,6 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { runTest("compiler/testData/codegen/bytecodeText/whenStringOptimization/inlineStringConstInsideWhen.kt"); } - @Test - @TestMetadata("nonInlinedConst.kt") - public void testNonInlinedConst() throws Exception { - runTest("compiler/testData/codegen/bytecodeText/whenStringOptimization/nonInlinedConst.kt"); - } - @Test @TestMetadata("nullability.kt") public void testNullability() throws Exception { diff --git a/compiler/testData/codegen/box/constants/kt9532_lv10.kt b/compiler/testData/codegen/box/constants/kt9532_lv10.kt deleted file mode 100644 index 8e9899cfaf0..00000000000 --- a/compiler/testData/codegen/box/constants/kt9532_lv10.kt +++ /dev/null @@ -1,38 +0,0 @@ -// IGNORE_BACKEND: WASM -// WASM_MUTE_REASON: IGNORED_IN_JS -// !LANGUAGE: -InlineConstVals -// IGNORE_BACKEND: JS_IR, NATIVE -// IGNORE_BACKEND: JS_IR_ES6 -// TODO: muted automatically, investigate should it be ran for JS or not -// IGNORE_BACKEND: JS - -object A { - const val a: String = "$" - const val b = "1234$a" - const val c = 10000 - - val bNonConst = "1234$a" - val bNullable: String? = "1234$a" -} - -object B { - const val a: String = "$" - const val b = "1234$a" - const val c = 10000 - - val bNonConst = "1234$a" - val bNullable: String? = "1234$a" -} - -fun box(): String { - if (A.a !== B.a) return "Fail 1: A.a !== B.a" - - if (A.b !== B.b) return "Fail 2: A.b !== B.b" - - if (A.c !== B.c) return "Fail 3: A.c !== B.c" - - if (A.bNonConst === B.bNonConst) return "Fail 4: A.bNonConst === B.bNonConst" - if (A.bNullable === B.bNullable) return "Fail 5: A.bNullable === B.bNullable" - - return "OK" -} \ No newline at end of file diff --git a/compiler/testData/codegen/box/delegation/simple1.0.kt b/compiler/testData/codegen/box/delegation/simple1.0.kt deleted file mode 100644 index 8452c762cc7..00000000000 --- a/compiler/testData/codegen/box/delegation/simple1.0.kt +++ /dev/null @@ -1,27 +0,0 @@ -// !LANGUAGE: -NoDelegationToJavaDefaultInterfaceMembers -// IGNORE_BACKEND_FIR: JVM_IR -// FIR status: don't support legacy feature -// TARGET_BACKEND: JVM -// JVM_TARGET: 1.8 -// FILE: Base.java - -public interface Base { - String getValue(); - - default String test() { - return getValue(); - } -} - -// FILE: main.kt - -class OK : Base { - override fun getValue() = "OK" -} - -fun box(): String { - val z = object : Base by OK() { - override fun getValue() = "Fail" - } - return z.test() -} diff --git a/compiler/testData/codegen/box/jdk/streamBackwardCompatibility.kt b/compiler/testData/codegen/box/jdk/streamBackwardCompatibility.kt deleted file mode 100644 index c6179014a41..00000000000 --- a/compiler/testData/codegen/box/jdk/streamBackwardCompatibility.kt +++ /dev/null @@ -1,11 +0,0 @@ -// !LANGUAGE: -AdditionalBuiltInsMembers -// SKIP_JDK6 -// TARGET_BACKEND: JVM -// WITH_STDLIB -// FULL_JDK - -class A(val x: List) : List by x - -fun box(): String { - return A(listOf("OK"))[0] -} diff --git a/compiler/testData/codegen/bytecodeText/constProperty/noInline.kt b/compiler/testData/codegen/bytecodeText/constProperty/noInline.kt deleted file mode 100644 index 060d47b551a..00000000000 --- a/compiler/testData/codegen/bytecodeText/constProperty/noInline.kt +++ /dev/null @@ -1,12 +0,0 @@ -// !LANGUAGE: -InlineConstVals -// IGNORE_BACKEND_FIR: JVM_IR - -// Fir2Ir IrConstTransformer inline everything it can unconditionally -// No fix atm, we don't have to support this feature -const val z = 0 - -fun a() { - val x = z -} - -// 1 GETSTATIC NoInlineKt.z : I diff --git a/compiler/testData/codegen/bytecodeText/constProperty/noInlineInCmp.kt b/compiler/testData/codegen/bytecodeText/constProperty/noInlineInCmp.kt deleted file mode 100644 index 0b4f71083cd..00000000000 --- a/compiler/testData/codegen/bytecodeText/constProperty/noInlineInCmp.kt +++ /dev/null @@ -1,12 +0,0 @@ -// !LANGUAGE: -InlineConstVals -// IGNORE_BACKEND_FIR: JVM_IR -// FIR status: don't support legacy feature - -const val z = 0 - -fun a() { - if (z == 2) { - } -} - -// 1 GETSTATIC NoInlineInCmpKt.z : I diff --git a/compiler/testData/codegen/bytecodeText/constants/noInlineNonStaticJavaField_lv10.kt b/compiler/testData/codegen/bytecodeText/constants/noInlineNonStaticJavaField_lv10.kt deleted file mode 100644 index 78578e56c0e..00000000000 --- a/compiler/testData/codegen/bytecodeText/constants/noInlineNonStaticJavaField_lv10.kt +++ /dev/null @@ -1,15 +0,0 @@ -// !LANGUAGE: -InlineConstVals -// FILE: test.kt -fun test1(a: A) = a.X -fun test2(a: A) = 1 + a.X -fun test3(a: A) = 1 < a.X - -// FILE: A.java -public class A { - public final int X = 42; -} - -// @TestKt.class: -// 0 42 -// 0 43 -// 3 GETFIELD A.X diff --git a/compiler/testData/codegen/bytecodeText/lazyCodegen/negateConstantCompare.kt b/compiler/testData/codegen/bytecodeText/lazyCodegen/negateConstantCompare.kt deleted file mode 100644 index a90b754a68b..00000000000 --- a/compiler/testData/codegen/bytecodeText/lazyCodegen/negateConstantCompare.kt +++ /dev/null @@ -1,14 +0,0 @@ -// !LANGUAGE: -InlineConstVals -// IGNORE_BACKEND_FIR: JVM_IR -// FIR status: don't support legacy feature - -const val one = 1 -const val two = 2 - -fun test1() { - if (!(one < two)) { - val p = 1 - } -} - -// 1 IF diff --git a/compiler/testData/codegen/bytecodeText/whenStringOptimization/nonInlinedConst.kt b/compiler/testData/codegen/bytecodeText/whenStringOptimization/nonInlinedConst.kt deleted file mode 100644 index 45dd3192a8b..00000000000 --- a/compiler/testData/codegen/bytecodeText/whenStringOptimization/nonInlinedConst.kt +++ /dev/null @@ -1,16 +0,0 @@ -// !LANGUAGE: -InlineConstVals -// IGNORE_BACKEND_FIR: JVM_IR -// FIR status: don't support legacy feature - -const val y = "cde" - -fun foo(x : String) : String { - when (x) { - "abc", "${y}" -> return "abc_cde" - "e" + "fg", "ghi" -> return "efg_ghi" - } - - return "other" -} - -// 0 LOOKUPSWITCH diff --git a/compiler/testData/diagnostics/tests/SingleUnderscoreUnsupported.fir.kt b/compiler/testData/diagnostics/tests/SingleUnderscoreUnsupported.fir.kt deleted file mode 100644 index 691287f983b..00000000000 --- a/compiler/testData/diagnostics/tests/SingleUnderscoreUnsupported.fir.kt +++ /dev/null @@ -1,27 +0,0 @@ -// !LANGUAGE: -SingleUnderscoreForParameterName - -data class A(val x: Int, val y: Int) - -fun foo(a: Array) { - val (_, y) = A(1, 2) - y.hashCode() - - val q1: (Int, String) -> Unit = { - _, s -> s.hashCode() - } - q1(1, "") - - val q2: (Int, String) -> Unit = fun(_: Int, s: String) { - s.hashCode() - } - q2(1, "") - - val q3: (A) -> Unit = { - (_, y) -> y.hashCode() - } - q3(A(2, 3)) - - for ((_, z) in a) { - z.hashCode() - } -} diff --git a/compiler/testData/diagnostics/tests/SingleUnderscoreUnsupported.kt b/compiler/testData/diagnostics/tests/SingleUnderscoreUnsupported.kt deleted file mode 100644 index cb316cf88b2..00000000000 --- a/compiler/testData/diagnostics/tests/SingleUnderscoreUnsupported.kt +++ /dev/null @@ -1,27 +0,0 @@ -// !LANGUAGE: -SingleUnderscoreForParameterName - -data class A(val x: Int, val y: Int) - -fun foo(a: Array) { - val (_, y) = A(1, 2) - y.hashCode() - - val q1: (Int, String) -> Unit = { - _, s -> s.hashCode() - } - q1(1, "") - - val q2: (Int, String) -> Unit = fun(_: Int, s: String) { - s.hashCode() - } - q2(1, "") - - val q3: (A) -> Unit = { - (_, y) -> y.hashCode() - } - q3(A(2, 3)) - - for ((_, z) in a) { - z.hashCode() - } -} diff --git a/compiler/testData/diagnostics/tests/SingleUnderscoreUnsupported.txt b/compiler/testData/diagnostics/tests/SingleUnderscoreUnsupported.txt deleted file mode 100644 index 98548b36ce7..00000000000 --- a/compiler/testData/diagnostics/tests/SingleUnderscoreUnsupported.txt +++ /dev/null @@ -1,15 +0,0 @@ -package - -public fun foo(/*0*/ a: kotlin.Array): kotlin.Unit - -public final data class A { - public constructor A(/*0*/ x: kotlin.Int, /*1*/ y: kotlin.Int) - public final val x: kotlin.Int - public final val y: kotlin.Int - public final operator /*synthesized*/ fun component1(): kotlin.Int - public final operator /*synthesized*/ fun component2(): kotlin.Int - public final /*synthesized*/ fun copy(/*0*/ x: kotlin.Int = ..., /*1*/ y: kotlin.Int = ...): A - public open override /*1*/ /*synthesized*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*synthesized*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*synthesized*/ fun toString(): kotlin.String -} diff --git a/compiler/testData/diagnostics/tests/UnusedParametersVersion10.kt b/compiler/testData/diagnostics/tests/UnusedParametersVersion10.kt deleted file mode 100644 index 761dc5dccc3..00000000000 --- a/compiler/testData/diagnostics/tests/UnusedParametersVersion10.kt +++ /dev/null @@ -1,4 +0,0 @@ -// FIR_IDENTICAL -// !LANGUAGE: -SingleUnderscoreForParameterName - -val x = 1.let { arg -> } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/UnusedParametersVersion10.txt b/compiler/testData/diagnostics/tests/UnusedParametersVersion10.txt deleted file mode 100644 index 6ba11bfce59..00000000000 --- a/compiler/testData/diagnostics/tests/UnusedParametersVersion10.txt +++ /dev/null @@ -1,3 +0,0 @@ -package - -public val x: kotlin.Unit diff --git a/compiler/testData/diagnostics/tests/callableReference/generic/noInferenceFeatureForCallableReferences.fir.kt b/compiler/testData/diagnostics/tests/callableReference/generic/noInferenceFeatureForCallableReferences.fir.kt deleted file mode 100644 index 76f8bdfc56b..00000000000 --- a/compiler/testData/diagnostics/tests/callableReference/generic/noInferenceFeatureForCallableReferences.fir.kt +++ /dev/null @@ -1,67 +0,0 @@ -// !LANGUAGE: -TypeInferenceOnGenericsForCallableReferences -// !DIAGNOSTICS: -UNUSED_VARIABLE, -UNUSED_PARAMETER - -fun bar(s: T) {} -fun complex(t: T, f: (T) -> Unit) {} -fun simple(f: (T) -> Unit) {} - -fun test1() { - complex(1, ::bar) - simple(::bar) -} - -// --- - -fun takeFun(f: (T) -> Unit) {} -fun callFun(f: (T) -> R): R = TODO() - -fun foo(s: T) {} - -open class Wrapper(val value: T) -fun > createWrapper(s: T): R = TODO() - -fun Wrapper.baz(transform: (T) -> Unit): T = TODO() - -fun test2() { - takeFun(::foo) - - callFun>(::createWrapper) - callFun>(::createWrapper) - callFun>(::createWrapper) - - callFun>(::createWrapper).baz(::foo) -} - -// --- - -fun test3() { - val a1: Array Double> = arrayOf(Double::plus, Double::minus) - val a2: Array Double> = arrayOf(Double::plus, Double::minus) -} - -// --- - -class A1 { - fun a1(t: T): Unit {} - fun test1(): (String) -> Unit = A1()::a1 -} - -class A2 { - fun a2(key: K): V = TODO() - - fun test1(): (String) -> Unit = A2()::a2 - fun test2(): (T3) -> T3 = A2()::a2 -} - -// --- - -fun foo1(x: Int?) {} -fun foo1(y: String?) {} -fun foo1(z: Boolean) {} - -fun baz1(element: (T) -> Unit): T? = null - -fun test4() { - val a1: Int? = baz1(::foo1) - val a2: String? = baz1(::foo1) -} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/callableReference/generic/noInferenceFeatureForCallableReferences.kt b/compiler/testData/diagnostics/tests/callableReference/generic/noInferenceFeatureForCallableReferences.kt deleted file mode 100644 index 522dc6191ba..00000000000 --- a/compiler/testData/diagnostics/tests/callableReference/generic/noInferenceFeatureForCallableReferences.kt +++ /dev/null @@ -1,67 +0,0 @@ -// !LANGUAGE: -TypeInferenceOnGenericsForCallableReferences -// !DIAGNOSTICS: -UNUSED_VARIABLE, -UNUSED_PARAMETER - -fun bar(s: T) {} -fun complex(t: T, f: (T) -> Unit) {} -fun simple(f: (T) -> Unit) {} - -fun test1() { - complex(1, ::bar) - simple(::bar) -} - -// --- - -fun takeFun(f: (T) -> Unit) {} -fun callFun(f: (T) -> R): R = TODO() - -fun foo(s: T) {} - -open class Wrapper(val value: T) -fun > createWrapper(s: T): R = TODO() - -fun Wrapper.baz(transform: (T) -> Unit): T = TODO() - -fun test2() { - takeFun(::foo) - - callFun>(::createWrapper) - callFun>(::createWrapper) - callFun>(::createWrapper) - - callFun>(::createWrapper).baz(::foo) -} - -// --- - -fun test3() { - val a1: Array Double> = arrayOf(Double::plus, Double::minus) - val a2: Array Double> = arrayOf(Double::plus, Double::minus) -} - -// --- - -class A1 { - fun a1(t: T): Unit {} - fun test1(): (String) -> Unit = A1()::a1 -} - -class A2 { - fun a2(key: K): V = TODO() - - fun test1(): (String) -> Unit = A2()::a2 - fun test2(): (T3) -> T3 = A2()::a2 -} - -// --- - -fun foo1(x: Int?) {} -fun foo1(y: String?) {} -fun foo1(z: Boolean) {} - -fun baz1(element: (T) -> Unit): T? = null - -fun test4() { - val a1: Int? = baz1(::foo1) - val a2: String? = baz1(::foo1) -} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/callableReference/generic/noInferenceFeatureForCallableReferences.txt b/compiler/testData/diagnostics/tests/callableReference/generic/noInferenceFeatureForCallableReferences.txt deleted file mode 100644 index fa95869f473..00000000000 --- a/compiler/testData/diagnostics/tests/callableReference/generic/noInferenceFeatureForCallableReferences.txt +++ /dev/null @@ -1,45 +0,0 @@ -package - -public fun bar(/*0*/ s: T): kotlin.Unit -public fun baz1(/*0*/ element: (T) -> kotlin.Unit): T? -public fun callFun(/*0*/ f: (T) -> R): R -public fun complex(/*0*/ t: T, /*1*/ f: (T) -> kotlin.Unit): kotlin.Unit -public fun > createWrapper(/*0*/ s: T): R -public fun foo(/*0*/ s: T): kotlin.Unit -public fun foo1(/*0*/ z: kotlin.Boolean): kotlin.Unit -public fun foo1(/*0*/ x: kotlin.Int?): kotlin.Unit -public fun foo1(/*0*/ y: kotlin.String?): kotlin.Unit -public fun simple(/*0*/ f: (T) -> kotlin.Unit): kotlin.Unit -public fun takeFun(/*0*/ f: (T) -> kotlin.Unit): kotlin.Unit -public fun test1(): kotlin.Unit -public fun test2(): kotlin.Unit -public fun test3(): kotlin.Unit -public fun test4(): kotlin.Unit -public fun Wrapper.baz(/*0*/ transform: (T) -> kotlin.Unit): T - -public final class A1 { - public constructor A1() - public final fun a1(/*0*/ t: T): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public final fun test1(): (kotlin.String) -> kotlin.Unit - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} - -public final class A2 { - public constructor A2() - public final fun a2(/*0*/ key: K): V - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public final fun test1(): (kotlin.String) -> kotlin.Unit - public final fun test2(): (T3) -> T3 - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} - -public open class Wrapper { - public constructor Wrapper(/*0*/ value: T) - public final val value: T - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} diff --git a/compiler/testData/diagnostics/tests/collectionLiterals/noArrayLiteralsInAnnotationsFeature.fir.kt b/compiler/testData/diagnostics/tests/collectionLiterals/noArrayLiteralsInAnnotationsFeature.fir.kt deleted file mode 100644 index 2134e0ebeae..00000000000 --- a/compiler/testData/diagnostics/tests/collectionLiterals/noArrayLiteralsInAnnotationsFeature.fir.kt +++ /dev/null @@ -1,19 +0,0 @@ -// !LANGUAGE: -ArrayLiteralsInAnnotations -annotation class Foo( - val a: IntArray = [], - val b: FloatArray = [1f, 2f], - val c: Array = ["/"] -) - -@Foo -fun test1() {} - -@Foo(a = [1, 2], c = ["a"]) -fun test2() {} - -@Foo([1], [3f], ["a"]) -fun test3() {} - -fun test4() { - [1, 2] -} diff --git a/compiler/testData/diagnostics/tests/collectionLiterals/noArrayLiteralsInAnnotationsFeature.kt b/compiler/testData/diagnostics/tests/collectionLiterals/noArrayLiteralsInAnnotationsFeature.kt deleted file mode 100644 index b56cb4d1956..00000000000 --- a/compiler/testData/diagnostics/tests/collectionLiterals/noArrayLiteralsInAnnotationsFeature.kt +++ /dev/null @@ -1,19 +0,0 @@ -// !LANGUAGE: -ArrayLiteralsInAnnotations -annotation class Foo( - val a: IntArray = [], - val b: FloatArray = [1f, 2f], - val c: Array = ["/"] -) - -@Foo -fun test1() {} - -@Foo(a = [1, 2], c = ["a"]) -fun test2() {} - -@Foo([1], [3f], ["a"]) -fun test3() {} - -fun test4() { - [1, 2] -} diff --git a/compiler/testData/diagnostics/tests/collectionLiterals/noArrayLiteralsInAnnotationsFeature.txt b/compiler/testData/diagnostics/tests/collectionLiterals/noArrayLiteralsInAnnotationsFeature.txt deleted file mode 100644 index 4fe23994c9a..00000000000 --- a/compiler/testData/diagnostics/tests/collectionLiterals/noArrayLiteralsInAnnotationsFeature.txt +++ /dev/null @@ -1,16 +0,0 @@ -package - -@Foo public fun test1(): kotlin.Unit -@Foo(a = {1, 2}, c = {"a"}) public fun test2(): kotlin.Unit -@Foo(a = {1}, b = {3.0.toFloat()}, c = {"a"}) public fun test3(): kotlin.Unit -public fun test4(): kotlin.Unit - -public final annotation class Foo : kotlin.Annotation { - public constructor Foo(/*0*/ a: kotlin.IntArray = ..., /*1*/ b: kotlin.FloatArray = ..., /*2*/ c: kotlin.Array = ...) - public final val a: kotlin.IntArray - public final val b: kotlin.FloatArray - public final val c: kotlin.Array - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} diff --git a/compiler/testData/diagnostics/tests/controlFlowAnalysis/unusedInAnonymous.kt b/compiler/testData/diagnostics/tests/controlFlowAnalysis/unusedInAnonymous.kt deleted file mode 100644 index a122b2a8706..00000000000 --- a/compiler/testData/diagnostics/tests/controlFlowAnalysis/unusedInAnonymous.kt +++ /dev/null @@ -1,10 +0,0 @@ -// FIR_IDENTICAL -// !LANGUAGE: -SingleUnderscoreForParameterName -// See KT-8813, KT-9631 - -fun someApi(f: (Int) -> Unit) = f(42) - -fun test() { - someApi(fun(p: Int) {}) - // Apparently "p" cannot be removed because the signature is fixed by "someApi -} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/controlFlowAnalysis/unusedInAnonymous.txt b/compiler/testData/diagnostics/tests/controlFlowAnalysis/unusedInAnonymous.txt deleted file mode 100644 index 9f05f07e8b8..00000000000 --- a/compiler/testData/diagnostics/tests/controlFlowAnalysis/unusedInAnonymous.txt +++ /dev/null @@ -1,4 +0,0 @@ -package - -public fun someApi(/*0*/ f: (kotlin.Int) -> kotlin.Unit): kotlin.Unit -public fun test(): kotlin.Unit diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/unsupportedOperatorProvideDelegate.fir.kt b/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/unsupportedOperatorProvideDelegate.fir.kt deleted file mode 100644 index a18129f93a8..00000000000 --- a/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/unsupportedOperatorProvideDelegate.fir.kt +++ /dev/null @@ -1,14 +0,0 @@ -// !DIAGNOSTICS: -UNUSED_PARAMETER -// !LANGUAGE: -OperatorProvideDelegate - -class WrongDelegate(val x: Int) { - operator fun getValue(thisRef: Any?, prop: Any): Int = x -} - -operator fun String.provideDelegate(thisRef: Any?, prop: Any) = WrongDelegate(this.length) - -operator fun String.getValue(thisRef: Any?, prop: Any) = this - -val test1: String by "OK" -val test2: Int by "OK" -val test3 by "OK" diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/unsupportedOperatorProvideDelegate.kt b/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/unsupportedOperatorProvideDelegate.kt deleted file mode 100644 index e92730fa924..00000000000 --- a/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/unsupportedOperatorProvideDelegate.kt +++ /dev/null @@ -1,14 +0,0 @@ -// !DIAGNOSTICS: -UNUSED_PARAMETER -// !LANGUAGE: -OperatorProvideDelegate - -class WrongDelegate(val x: Int) { - operator fun getValue(thisRef: Any?, prop: Any): Int = x -} - -operator fun String.provideDelegate(thisRef: Any?, prop: Any) = WrongDelegate(this.length) - -operator fun String.getValue(thisRef: Any?, prop: Any) = this - -val test1: String by "OK" -val test2: Int by "OK" -val test3 by "OK" diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/unsupportedOperatorProvideDelegate.txt b/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/unsupportedOperatorProvideDelegate.txt deleted file mode 100644 index 1cf4515b120..00000000000 --- a/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/unsupportedOperatorProvideDelegate.txt +++ /dev/null @@ -1,16 +0,0 @@ -package - -public val test1: kotlin.String -public val test2: kotlin.Int -public val test3: kotlin.String -public operator fun kotlin.String.getValue(/*0*/ thisRef: kotlin.Any?, /*1*/ prop: kotlin.Any): kotlin.String -public operator fun kotlin.String.provideDelegate(/*0*/ thisRef: kotlin.Any?, /*1*/ prop: kotlin.Any): WrongDelegate - -public final class WrongDelegate { - public constructor WrongDelegate(/*0*/ x: kotlin.Int) - public final val x: kotlin.Int - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public final operator fun getValue(/*0*/ thisRef: kotlin.Any?, /*1*/ prop: kotlin.Any): kotlin.Int - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} diff --git a/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/unsupportedFeature.fir.kt b/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/unsupportedFeature.fir.kt deleted file mode 100644 index 96aa55ce781..00000000000 --- a/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/unsupportedFeature.fir.kt +++ /dev/null @@ -1,13 +0,0 @@ -// !LANGUAGE: -DestructuringLambdaParameters -// !CHECK_TYPE -// !DIAGNOSTICS: -UNUSED_PARAMETER -data class A(val x: Int, val y: String) - -fun foo(block: (A) -> Unit) { } - -fun bar() { - foo { (a, b) -> - a checkType { _() } - b checkType { _() } - } -} diff --git a/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/unsupportedFeature.kt b/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/unsupportedFeature.kt deleted file mode 100644 index 12927b9cdc1..00000000000 --- a/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/unsupportedFeature.kt +++ /dev/null @@ -1,13 +0,0 @@ -// !LANGUAGE: -DestructuringLambdaParameters -// !CHECK_TYPE -// !DIAGNOSTICS: -UNUSED_PARAMETER -data class A(val x: Int, val y: String) - -fun foo(block: (A) -> Unit) { } - -fun bar() { - foo { (a, b) -> - a checkType { _() } - b checkType { _() } - } -} diff --git a/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/unsupportedFeature.txt b/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/unsupportedFeature.txt deleted file mode 100644 index 9ddbb77f5c6..00000000000 --- a/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/unsupportedFeature.txt +++ /dev/null @@ -1,16 +0,0 @@ -package - -public fun bar(): kotlin.Unit -public fun foo(/*0*/ block: (A) -> kotlin.Unit): kotlin.Unit - -public final data class A { - public constructor A(/*0*/ x: kotlin.Int, /*1*/ y: kotlin.String) - public final val x: kotlin.Int - public final val y: kotlin.String - public final operator /*synthesized*/ fun component1(): kotlin.Int - public final operator /*synthesized*/ fun component2(): kotlin.String - public final /*synthesized*/ fun copy(/*0*/ x: kotlin.Int = ..., /*1*/ y: kotlin.String = ...): A - public open override /*1*/ /*synthesized*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*synthesized*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*synthesized*/ fun toString(): kotlin.String -} diff --git a/compiler/testData/diagnostics/tests/inline/defaultLambdaInlineDisable.fir.kt b/compiler/testData/diagnostics/tests/inline/defaultLambdaInlineDisable.fir.kt deleted file mode 100644 index dca811d2967..00000000000 --- a/compiler/testData/diagnostics/tests/inline/defaultLambdaInlineDisable.fir.kt +++ /dev/null @@ -1,48 +0,0 @@ -// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE -NOTHING_TO_INLINE -// !LANGUAGE: -InlineDefaultFunctionalParameters - -fun test() = "OK" - -val prop = "OK" - -class Foo { - fun test() = "OK" - val prop = "OK" -} - -object FooObject { - fun test() = "OK" - val prop = "OK" -} - -inline fun default1(s : () -> String = { "OK" }) {} -inline fun default2(s : () -> String = ::test) {} -inline fun default3(s : () -> String = ::prop) {} -inline fun default4(s : () -> String = FooObject::test) {} -inline fun default5(s : () -> String = FooObject::prop) {} -inline fun default6(s : (a: Foo) -> String = Foo::test) {} -inline fun default7(s : (a: Foo) -> String = Foo::prop) {} - -val a = Foo() - -inline fun default8(s : () -> String = a::test) {} -inline fun default9(s : () -> String = a::prop) {} - -inline fun default10(s : () -> String = object : Function0 { - override fun invoke(): String { - return "FAIL" - } -}) {} - - -abstract class Base { - abstract fun foo(f: () -> Unit = { }) -} - -class Derived : Base() { - override final inline fun foo(f: () -> Unit) { - f() - } -} - -inline fun default11(s : () -> Derived = ::Derived) {} diff --git a/compiler/testData/diagnostics/tests/inline/defaultLambdaInlineDisable.kt b/compiler/testData/diagnostics/tests/inline/defaultLambdaInlineDisable.kt deleted file mode 100644 index 0dbe03dcabc..00000000000 --- a/compiler/testData/diagnostics/tests/inline/defaultLambdaInlineDisable.kt +++ /dev/null @@ -1,48 +0,0 @@ -// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE -NOTHING_TO_INLINE -// !LANGUAGE: -InlineDefaultFunctionalParameters - -fun test() = "OK" - -val prop = "OK" - -class Foo { - fun test() = "OK" - val prop = "OK" -} - -object FooObject { - fun test() = "OK" - val prop = "OK" -} - -inline fun default1(s : () -> String = { "OK" }) {} -inline fun default2(s : () -> String = ::test) {} -inline fun default3(s : () -> String = ::prop) {} -inline fun default4(s : () -> String = FooObject::test) {} -inline fun default5(s : () -> String = FooObject::prop) {} -inline fun default6(s : (a: Foo) -> String = Foo::test) {} -inline fun default7(s : (a: Foo) -> String = Foo::prop) {} - -val a = Foo() - -inline fun default8(s : () -> String = a::test) {} -inline fun default9(s : () -> String = a::prop) {} - -inline fun default10(s : () -> String = object : Function0 { - override fun invoke(): String { - return "FAIL" - } -}) {} - - -abstract class Base { - abstract fun foo(f: () -> Unit = { }) -} - -class Derived : Base() { - override final inline fun foo(f: () -> Unit) { - f() - } -} - -inline fun default11(s : () -> Derived = ::Derived) {} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/inline/defaultLambdaInlineDisable.txt b/compiler/testData/diagnostics/tests/inline/defaultLambdaInlineDisable.txt deleted file mode 100644 index 33ce083da54..00000000000 --- a/compiler/testData/diagnostics/tests/inline/defaultLambdaInlineDisable.txt +++ /dev/null @@ -1,50 +0,0 @@ -package - -public val a: Foo -public val prop: kotlin.String = "OK" -public inline fun default1(/*0*/ s: () -> kotlin.String = ...): kotlin.Unit -public inline fun default10(/*0*/ s: () -> kotlin.String = ...): kotlin.Unit -public inline fun default11(/*0*/ s: () -> Derived = ...): kotlin.Unit -public inline fun default2(/*0*/ s: () -> kotlin.String = ...): kotlin.Unit -public inline fun default3(/*0*/ s: () -> kotlin.String = ...): kotlin.Unit -public inline fun default4(/*0*/ s: () -> kotlin.String = ...): kotlin.Unit -public inline fun default5(/*0*/ s: () -> kotlin.String = ...): kotlin.Unit -public inline fun default6(/*0*/ s: (a: Foo) -> kotlin.String = ...): kotlin.Unit -public inline fun default7(/*0*/ s: (a: Foo) -> kotlin.String = ...): kotlin.Unit -public inline fun default8(/*0*/ s: () -> kotlin.String = ...): kotlin.Unit -public inline fun default9(/*0*/ s: () -> kotlin.String = ...): kotlin.Unit -public fun test(): kotlin.String - -public abstract class Base { - public constructor Base() - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public abstract fun foo(/*0*/ f: () -> kotlin.Unit = ...): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} - -public final class Derived : Base { - public constructor Derived() - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public final override /*1*/ inline fun foo(/*0*/ f: () -> kotlin.Unit = ...): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} - -public final class Foo { - public constructor Foo() - public final val prop: kotlin.String = "OK" - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public final fun test(): kotlin.String - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} - -public object FooObject { - private constructor FooObject() - public final val prop: kotlin.String = "OK" - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public final fun test(): kotlin.String - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} diff --git a/compiler/testData/diagnostics/tests/inline/inlineLambdaInDefaultInlineParameterDisabled.fir.kt b/compiler/testData/diagnostics/tests/inline/inlineLambdaInDefaultInlineParameterDisabled.fir.kt deleted file mode 100644 index dc882c9e78b..00000000000 --- a/compiler/testData/diagnostics/tests/inline/inlineLambdaInDefaultInlineParameterDisabled.fir.kt +++ /dev/null @@ -1,60 +0,0 @@ -// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE -NOTHING_TO_INLINE -// !LANGUAGE: -InlineDefaultFunctionalParameters - -inline fun inlineFun(lambda: () -> String) = lambda() - -fun noInlineFun(lambda: () -> String) = lambda() - - -inline fun default0_1(lambda: () -> String, dlambda: () -> String = { lambda }) { - lambda() + dlambda() -} - -inline fun default0_2(lambda: () -> String, dlambda: () -> String = { noInlineFun (lambda) }) { - lambda() + dlambda() -} - - - -inline fun default1_0(lambda: () -> String, dlambda: () -> String = { lambda() }) { - lambda() + dlambda() -} - -inline fun default1_1(lambda: () -> String, noinline dlambda: () -> String = { lambda() }) { - lambda() + dlambda() -} - -inline fun default1_1crossinline(crossinline lambda: () -> String, noinline dlambda: () -> String = { lambda() }) { - lambda() + dlambda() -} - -inline fun default1_2(noinline lambda: () -> String, dlambda: () -> String = { lambda() }) { - lambda() + dlambda() -} - -inline fun default1_3(noinline lambda: () -> String, noinline dlambda: () -> String = { lambda() }) { - lambda() + dlambda() -} - - - - -inline fun default2_0(lambda: () -> String, dlambda: () -> String = { inlineFun(lambda) }) { - lambda() + dlambda() -} - -inline fun default2_1(lambda: () -> String, noinline dlambda: () -> String = { inlineFun(lambda) }) { - lambda() + dlambda() -} - -inline fun default2_1crossinline(crossinline lambda: () -> String, noinline dlambda: () -> String = { inlineFun(lambda) }) { - lambda() + dlambda() -} - -inline fun default2_2(noinline lambda: () -> String, dlambda: () -> String = { inlineFun(lambda) }) { - lambda() + dlambda() -} - -inline fun default2_3(noinline lambda: () -> String, noinline dlambda: () -> String = { inlineFun(lambda) }) { - lambda() + dlambda() -} diff --git a/compiler/testData/diagnostics/tests/inline/inlineLambdaInDefaultInlineParameterDisabled.kt b/compiler/testData/diagnostics/tests/inline/inlineLambdaInDefaultInlineParameterDisabled.kt deleted file mode 100644 index 78937d8386c..00000000000 --- a/compiler/testData/diagnostics/tests/inline/inlineLambdaInDefaultInlineParameterDisabled.kt +++ /dev/null @@ -1,60 +0,0 @@ -// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE -NOTHING_TO_INLINE -// !LANGUAGE: -InlineDefaultFunctionalParameters - -inline fun inlineFun(lambda: () -> String) = lambda() - -fun noInlineFun(lambda: () -> String) = lambda() - - -inline fun default0_1(lambda: () -> String, dlambda: () -> String = { lambda }) { - lambda() + dlambda() -} - -inline fun default0_2(lambda: () -> String, dlambda: () -> String = { noInlineFun (lambda) }) { - lambda() + dlambda() -} - - - -inline fun default1_0(lambda: () -> String, dlambda: () -> String = { lambda() }) { - lambda() + dlambda() -} - -inline fun default1_1(lambda: () -> String, noinline dlambda: () -> String = { lambda() }) { - lambda() + dlambda() -} - -inline fun default1_1crossinline(crossinline lambda: () -> String, noinline dlambda: () -> String = { lambda() }) { - lambda() + dlambda() -} - -inline fun default1_2(noinline lambda: () -> String, dlambda: () -> String = { lambda() }) { - lambda() + dlambda() -} - -inline fun default1_3(noinline lambda: () -> String, noinline dlambda: () -> String = { lambda() }) { - lambda() + dlambda() -} - - - - -inline fun default2_0(lambda: () -> String, dlambda: () -> String = { inlineFun(lambda) }) { - lambda() + dlambda() -} - -inline fun default2_1(lambda: () -> String, noinline dlambda: () -> String = { inlineFun(lambda) }) { - lambda() + dlambda() -} - -inline fun default2_1crossinline(crossinline lambda: () -> String, noinline dlambda: () -> String = { inlineFun(lambda) }) { - lambda() + dlambda() -} - -inline fun default2_2(noinline lambda: () -> String, dlambda: () -> String = { inlineFun(lambda) }) { - lambda() + dlambda() -} - -inline fun default2_3(noinline lambda: () -> String, noinline dlambda: () -> String = { inlineFun(lambda) }) { - lambda() + dlambda() -} diff --git a/compiler/testData/diagnostics/tests/inline/inlineLambdaInDefaultInlineParameterDisabled.txt b/compiler/testData/diagnostics/tests/inline/inlineLambdaInDefaultInlineParameterDisabled.txt deleted file mode 100644 index 1da78d9b9d6..00000000000 --- a/compiler/testData/diagnostics/tests/inline/inlineLambdaInDefaultInlineParameterDisabled.txt +++ /dev/null @@ -1,16 +0,0 @@ -package - -public inline fun default0_1(/*0*/ lambda: () -> kotlin.String, /*1*/ dlambda: () -> kotlin.String = ...): kotlin.Unit -public inline fun default0_2(/*0*/ lambda: () -> kotlin.String, /*1*/ dlambda: () -> kotlin.String = ...): kotlin.Unit -public inline fun default1_0(/*0*/ lambda: () -> kotlin.String, /*1*/ dlambda: () -> kotlin.String = ...): kotlin.Unit -public inline fun default1_1(/*0*/ lambda: () -> kotlin.String, /*1*/ noinline dlambda: () -> kotlin.String = ...): kotlin.Unit -public inline fun default1_1crossinline(/*0*/ crossinline lambda: () -> kotlin.String, /*1*/ noinline dlambda: () -> kotlin.String = ...): kotlin.Unit -public inline fun default1_2(/*0*/ noinline lambda: () -> kotlin.String, /*1*/ dlambda: () -> kotlin.String = ...): kotlin.Unit -public inline fun default1_3(/*0*/ noinline lambda: () -> kotlin.String, /*1*/ noinline dlambda: () -> kotlin.String = ...): kotlin.Unit -public inline fun default2_0(/*0*/ lambda: () -> kotlin.String, /*1*/ dlambda: () -> kotlin.String = ...): kotlin.Unit -public inline fun default2_1(/*0*/ lambda: () -> kotlin.String, /*1*/ noinline dlambda: () -> kotlin.String = ...): kotlin.Unit -public inline fun default2_1crossinline(/*0*/ crossinline lambda: () -> kotlin.String, /*1*/ noinline dlambda: () -> kotlin.String = ...): kotlin.Unit -public inline fun default2_2(/*0*/ noinline lambda: () -> kotlin.String, /*1*/ dlambda: () -> kotlin.String = ...): kotlin.Unit -public inline fun default2_3(/*0*/ noinline lambda: () -> kotlin.String, /*1*/ noinline dlambda: () -> kotlin.String = ...): kotlin.Unit -public inline fun inlineFun(/*0*/ lambda: () -> kotlin.String): kotlin.String -public fun noInlineFun(/*0*/ lambda: () -> kotlin.String): kotlin.String diff --git a/compiler/testData/diagnostics/tests/inline/unsupportedConstruction.fir.kt b/compiler/testData/diagnostics/tests/inline/unsupportedConstruction.fir.kt deleted file mode 100644 index 2f1c38d1f16..00000000000 --- a/compiler/testData/diagnostics/tests/inline/unsupportedConstruction.fir.kt +++ /dev/null @@ -1,33 +0,0 @@ -// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE -NOTHING_TO_INLINE -// !LANGUAGE: -InlineDefaultFunctionalParameters - -inline fun unsupported() { - - class A { - fun a() { - class AInner {} - } - } - - object B{ - object BInner {} - } - - fun local() { - fun localInner() {} - } -} - -inline fun unsupportedDefault(s : ()->Unit = {}) { - -} - -open class Base { - open fun foo(a: Int = 1) {} -} - -class Derived: Base() { - inline final override fun foo(a: Int) { - - } -} diff --git a/compiler/testData/diagnostics/tests/inline/unsupportedConstruction.kt b/compiler/testData/diagnostics/tests/inline/unsupportedConstruction.kt deleted file mode 100644 index 4b74c687b86..00000000000 --- a/compiler/testData/diagnostics/tests/inline/unsupportedConstruction.kt +++ /dev/null @@ -1,33 +0,0 @@ -// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE -NOTHING_TO_INLINE -// !LANGUAGE: -InlineDefaultFunctionalParameters - -inline fun unsupported() { - - class A { - fun a() { - class AInner {} - } - } - - object B{ - object BInner {} - } - - fun local() { - fun localInner() {} - } -} - -inline fun unsupportedDefault(s : ()->Unit = {}) { - -} - -open class Base { - open fun foo(a: Int = 1) {} -} - -class Derived: Base() { - inline final override fun foo(a: Int) { - - } -} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/inline/unsupportedConstruction.txt b/compiler/testData/diagnostics/tests/inline/unsupportedConstruction.txt deleted file mode 100644 index ce313589a00..00000000000 --- a/compiler/testData/diagnostics/tests/inline/unsupportedConstruction.txt +++ /dev/null @@ -1,20 +0,0 @@ -package - -public inline fun unsupported(): kotlin.Unit -public inline fun unsupportedDefault(/*0*/ s: () -> kotlin.Unit = ...): kotlin.Unit - -public open class Base { - public constructor Base() - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open fun foo(/*0*/ a: kotlin.Int = ...): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} - -public final class Derived : Base { - public constructor Derived() - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public final override /*1*/ inline fun foo(/*0*/ a: kotlin.Int = ...): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} diff --git a/compiler/testData/diagnostics/tests/inner/illegalModifier.kt b/compiler/testData/diagnostics/tests/inner/illegalModifier.kt deleted file mode 100644 index 4d5923a9625..00000000000 --- a/compiler/testData/diagnostics/tests/inner/illegalModifier.kt +++ /dev/null @@ -1,46 +0,0 @@ -// FIR_IDENTICAL -// !LANGUAGE: -InnerClassInEnumEntryClass -inner fun foo() {} -inner val prop = 42 - -inner class A -inner interface B -inner object C - -class D { - inner class E - inner interface F - inner object G - inner enum class R - inner annotation class S - inner companion object -} - -enum class H { - I0 { - inner class II0 - }, - inner I { - inner class II - }; - - inner class J -} - -interface K { - inner class L -} - -object N { - inner class O -} - -class P { - companion object { - inner class Q - } -} - -val R = object { - inner class S -} diff --git a/compiler/testData/diagnostics/tests/inner/illegalModifier.txt b/compiler/testData/diagnostics/tests/inner/illegalModifier.txt deleted file mode 100644 index b702ffd8ed6..00000000000 --- a/compiler/testData/diagnostics/tests/inner/illegalModifier.txt +++ /dev/null @@ -1,159 +0,0 @@ -package - -public val R: kotlin.Any -public val prop: kotlin.Int = 42 -public fun foo(): kotlin.Unit - -public final class A { - public constructor A() - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} - -public interface B { - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} - -public object C { - private constructor C() - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} - -public final class D { - public constructor D() - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - - public companion object Companion { - private constructor Companion() - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - } - - public final inner class E { - public constructor E() - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - } - - public interface F { - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - } - - public object G { - private constructor G() - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - } - - public final enum class R : kotlin.Enum { - private constructor R() - public final override /*1*/ /*fake_override*/ val name: kotlin.String - public final override /*1*/ /*fake_override*/ val ordinal: kotlin.Int - protected final override /*1*/ /*fake_override*/ fun clone(): kotlin.Any - public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: D.R): kotlin.Int - public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - protected/*protected and package*/ final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun finalize(): kotlin.Unit - public final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun getDeclaringClass(): java.lang.Class! - public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - - // Static members - public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): D.R - public final /*synthesized*/ fun values(): kotlin.Array - } - - public final annotation class S : kotlin.Annotation { - public constructor S() - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - } -} - -public final enum class H : kotlin.Enum { - enum entry I0 - - enum entry I - - private constructor H() - public final override /*1*/ /*fake_override*/ val name: kotlin.String - public final override /*1*/ /*fake_override*/ val ordinal: kotlin.Int - protected final override /*1*/ /*fake_override*/ fun clone(): kotlin.Any - public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: H): kotlin.Int - public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - protected/*protected and package*/ final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun finalize(): kotlin.Unit - public final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun getDeclaringClass(): java.lang.Class! - public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - - public final inner class J { - public constructor J() - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - } - - // Static members - public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): H - public final /*synthesized*/ fun values(): kotlin.Array -} - -public interface K { - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - - public final class L { - public constructor L() - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - } -} - -public object N { - private constructor N() - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - - public final class O { - public constructor O() - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - } -} - -public final class P { - public constructor P() - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - - public companion object Companion { - private constructor Companion() - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - - public final class Q { - public constructor Q() - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - } - } -} diff --git a/compiler/testData/diagnostics/tests/inner/innerClassInEnumEntryClass_lv11.fir.kt b/compiler/testData/diagnostics/tests/inner/innerClassInEnumEntryClass_lv11.fir.kt deleted file mode 100644 index f0125c67b6d..00000000000 --- a/compiler/testData/diagnostics/tests/inner/innerClassInEnumEntryClass_lv11.fir.kt +++ /dev/null @@ -1,19 +0,0 @@ -// !LANGUAGE: -InnerClassInEnumEntryClass -NestedClassesInEnumEntryShouldBeInner - -enum class Enum { - ENTRY_WITH_CLASS { - inner class TestInner - - class TestNested - - interface TestInterface - - object TestObject - - enum class TestEnumClass { - OTHER_ENTRY - } - - companion object {} - } -} diff --git a/compiler/testData/diagnostics/tests/inner/innerClassInEnumEntryClass_lv11.kt b/compiler/testData/diagnostics/tests/inner/innerClassInEnumEntryClass_lv11.kt deleted file mode 100644 index 40018bda5af..00000000000 --- a/compiler/testData/diagnostics/tests/inner/innerClassInEnumEntryClass_lv11.kt +++ /dev/null @@ -1,19 +0,0 @@ -// !LANGUAGE: -InnerClassInEnumEntryClass -NestedClassesInEnumEntryShouldBeInner - -enum class Enum { - ENTRY_WITH_CLASS { - inner class TestInner - - class TestNested - - interface TestInterface - - object TestObject - - enum class TestEnumClass { - OTHER_ENTRY - } - - companion object {} - } -} diff --git a/compiler/testData/diagnostics/tests/inner/innerClassInEnumEntryClass_lv11.txt b/compiler/testData/diagnostics/tests/inner/innerClassInEnumEntryClass_lv11.txt deleted file mode 100644 index e357e6ce0df..00000000000 --- a/compiler/testData/diagnostics/tests/inner/innerClassInEnumEntryClass_lv11.txt +++ /dev/null @@ -1,20 +0,0 @@ -package - -public final enum class Enum : kotlin.Enum { - enum entry ENTRY_WITH_CLASS - - private constructor Enum() - public final override /*1*/ /*fake_override*/ val name: kotlin.String - public final override /*1*/ /*fake_override*/ val ordinal: kotlin.Int - protected final override /*1*/ /*fake_override*/ fun clone(): kotlin.Any - public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: Enum): kotlin.Int - public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - protected/*protected and package*/ final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun finalize(): kotlin.Unit - public final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun getDeclaringClass(): java.lang.Class! - public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - - // Static members - public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): Enum - public final /*synthesized*/ fun values(): kotlin.Array -} diff --git a/compiler/testData/diagnostics/tests/j+k/defaultMethods_warning.fir.kt b/compiler/testData/diagnostics/tests/j+k/defaultMethods_warning.fir.kt deleted file mode 100644 index f8223874863..00000000000 --- a/compiler/testData/diagnostics/tests/j+k/defaultMethods_warning.fir.kt +++ /dev/null @@ -1,169 +0,0 @@ -// !LANGUAGE: -DefaultMethodsCallFromJava6TargetError -// !JVM_TARGET: 1.6 -// FILE: JavaInterface.java - -public interface JavaInterface { - static String testStatic() { - return "OK"; - } - - default String test() { - return "OK"; - } - - default String testOverride() { - return "OK"; - } -} - -// FILE: 1.kt - -import JavaInterface.testStatic - -interface KotlinInterface : JavaInterface { - fun fooo() { - testStatic() - super.test() - - object { - fun run () { - super@KotlinInterface.test() - } - } - } - - val propertyy: String - get() { - super.test() - - object { - fun run () { - super@KotlinInterface.test() - } - } - return "" - } - - override fun testOverride(): String { - return "OK"; - } -} - -interface KotlinInterfaceIndirectInheritance : KotlinInterface { - fun foooo() { - testStatic() - super.test() - - object { - fun run () { - super@KotlinInterfaceIndirectInheritance.test() - } - } - } - - val propertyyy: String - get() { - super.test() - - object { - fun run () { - super@KotlinInterfaceIndirectInheritance.test() - } - } - return "" - } -} - -open class KotlinClass : JavaInterface { - fun foo(){ - testStatic() - super.test() - super.testOverride() - - object { - fun run () { - super@KotlinClass.test() - } - } - } - - val property: String - get() { - super.test() - super.testOverride() - - object { - fun run () { - super@KotlinClass.test() - } - } - return "" - } -} - -class KotlinClassIndirectInheritance : KotlinClass() { - fun foo2(){ - testStatic() - super.test() - super.testOverride() - - object { - fun run () { - super@KotlinClassIndirectInheritance.test() - } - } - } - - val property2: String - get() { - super.test() - super.testOverride() - - object { - fun run () { - super@KotlinClassIndirectInheritance.test() - } - } - return "" - } -} - -class KotlinClassIndirectInheritance2 : KotlinInterfaceIndirectInheritance { - fun foo(){ - testStatic() - super.test() - super.testOverride() - - object { - fun run () { - super@KotlinClassIndirectInheritance2.test() - } - } - } - - val property: String - get() { - super.test() - super.testOverride() - - object { - fun run () { - super@KotlinClassIndirectInheritance2.test() - } - } - return "" - } -} - -fun test() { - JavaInterface.testStatic() - KotlinClass().foo() - KotlinClass().property - KotlinClassIndirectInheritance2().foo() - KotlinClassIndirectInheritance2().property - - KotlinClass().test() - KotlinClass().property - KotlinClass().testOverride() - KotlinClassIndirectInheritance().testOverride() -} diff --git a/compiler/testData/diagnostics/tests/j+k/defaultMethods_warning.kt b/compiler/testData/diagnostics/tests/j+k/defaultMethods_warning.kt deleted file mode 100644 index 0dec9512494..00000000000 --- a/compiler/testData/diagnostics/tests/j+k/defaultMethods_warning.kt +++ /dev/null @@ -1,169 +0,0 @@ -// !LANGUAGE: -DefaultMethodsCallFromJava6TargetError -// !JVM_TARGET: 1.6 -// FILE: JavaInterface.java - -public interface JavaInterface { - static String testStatic() { - return "OK"; - } - - default String test() { - return "OK"; - } - - default String testOverride() { - return "OK"; - } -} - -// FILE: 1.kt - -import JavaInterface.testStatic - -interface KotlinInterface : JavaInterface { - fun fooo() { - testStatic() - super.test() - - object { - fun run () { - super@KotlinInterface.test() - } - } - } - - val propertyy: String - get() { - super.test() - - object { - fun run () { - super@KotlinInterface.test() - } - } - return "" - } - - override fun testOverride(): String { - return "OK"; - } -} - -interface KotlinInterfaceIndirectInheritance : KotlinInterface { - fun foooo() { - testStatic() - super.test() - - object { - fun run () { - super@KotlinInterfaceIndirectInheritance.test() - } - } - } - - val propertyyy: String - get() { - super.test() - - object { - fun run () { - super@KotlinInterfaceIndirectInheritance.test() - } - } - return "" - } -} - -open class KotlinClass : JavaInterface { - fun foo(){ - testStatic() - super.test() - super.testOverride() - - object { - fun run () { - super@KotlinClass.test() - } - } - } - - val property: String - get() { - super.test() - super.testOverride() - - object { - fun run () { - super@KotlinClass.test() - } - } - return "" - } -} - -class KotlinClassIndirectInheritance : KotlinClass() { - fun foo2(){ - testStatic() - super.test() - super.testOverride() - - object { - fun run () { - super@KotlinClassIndirectInheritance.test() - } - } - } - - val property2: String - get() { - super.test() - super.testOverride() - - object { - fun run () { - super@KotlinClassIndirectInheritance.test() - } - } - return "" - } -} - -class KotlinClassIndirectInheritance2 : KotlinInterfaceIndirectInheritance { - fun foo(){ - testStatic() - super.test() - super.testOverride() - - object { - fun run () { - super@KotlinClassIndirectInheritance2.test() - } - } - } - - val property: String - get() { - super.test() - super.testOverride() - - object { - fun run () { - super@KotlinClassIndirectInheritance2.test() - } - } - return "" - } -} - -fun test() { - JavaInterface.testStatic() - KotlinClass().foo() - KotlinClass().property - KotlinClassIndirectInheritance2().foo() - KotlinClassIndirectInheritance2().property - - KotlinClass().test() - KotlinClass().property - KotlinClass().testOverride() - KotlinClassIndirectInheritance().testOverride() -} diff --git a/compiler/testData/diagnostics/tests/j+k/defaultMethods_warning.txt b/compiler/testData/diagnostics/tests/j+k/defaultMethods_warning.txt deleted file mode 100644 index 27dbcbff711..00000000000 --- a/compiler/testData/diagnostics/tests/j+k/defaultMethods_warning.txt +++ /dev/null @@ -1,75 +0,0 @@ -package - -public fun test(): kotlin.Unit - -public interface JavaInterface { - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open fun test(): kotlin.String! - public open fun testOverride(): kotlin.String! - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - - // Static members - public open fun testStatic(): kotlin.String! -} - -public open class KotlinClass : JavaInterface { - public constructor KotlinClass() - public final val property: kotlin.String - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public final fun foo(): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun test(): kotlin.String! - public open override /*1*/ /*fake_override*/ fun testOverride(): kotlin.String! - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} - -public final class KotlinClassIndirectInheritance : KotlinClass { - public constructor KotlinClassIndirectInheritance() - public final override /*1*/ /*fake_override*/ val property: kotlin.String - public final val property2: kotlin.String - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public final override /*1*/ /*fake_override*/ fun foo(): kotlin.Unit - public final fun foo2(): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun test(): kotlin.String! - public open override /*1*/ /*fake_override*/ fun testOverride(): kotlin.String! - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} - -public final class KotlinClassIndirectInheritance2 : KotlinInterfaceIndirectInheritance { - public constructor KotlinClassIndirectInheritance2() - public final val property: kotlin.String - public open override /*1*/ /*fake_override*/ val propertyy: kotlin.String - public open override /*1*/ /*fake_override*/ val propertyyy: kotlin.String - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public final fun foo(): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun fooo(): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun foooo(): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun test(): kotlin.String! - public open override /*1*/ /*fake_override*/ fun testOverride(): kotlin.String - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} - -public interface KotlinInterface : JavaInterface { - public open val propertyy: kotlin.String - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open fun fooo(): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun test(): kotlin.String! - public open override /*1*/ fun testOverride(): kotlin.String - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} - -public interface KotlinInterfaceIndirectInheritance : KotlinInterface { - public open override /*1*/ /*fake_override*/ val propertyy: kotlin.String - public open val propertyyy: kotlin.String - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun fooo(): kotlin.Unit - public open fun foooo(): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun test(): kotlin.String! - public open override /*1*/ /*fake_override*/ fun testOverride(): kotlin.String - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} diff --git a/compiler/testData/diagnostics/tests/lateinit/modifierApplicability.fir.kt b/compiler/testData/diagnostics/tests/lateinit/modifierApplicability.fir.kt deleted file mode 100644 index 976959c2304..00000000000 --- a/compiler/testData/diagnostics/tests/lateinit/modifierApplicability.fir.kt +++ /dev/null @@ -1,71 +0,0 @@ -// !LANGUAGE: -LateinitTopLevelProperties -LateinitLocalVariables -import kotlin.reflect.KProperty - -class CustomDelegate { - operator fun getValue(thisRef: Any?, prop: KProperty<*>): String = prop.name - operator fun setValue(thisRef: Any?, prop: KProperty<*>, value: String) {} -} - -public abstract class A(lateinit var p2: String) { - - public lateinit val a: String - lateinit val b: T - private lateinit var c: CharSequence - - lateinit val d: String - get - - public lateinit var e: String - get - private set - - fun a() { - lateinit var a: String - } - - lateinit var e1: V - lateinit var e2: String? - lateinit var e3: Int - lateinit var e4: Int? - lateinit var e5 = "A" - - // With initializer, primitive - lateinit var e6 = 3 - - lateinit var e7 by CustomDelegate() - - lateinit var e8: String - get() = "A" - - lateinit var e9: String - set(v) { field = v } - - abstract lateinit var e10: String - - lateinit var String.e11: String - - lateinit var String.e12: String -} - -lateinit val topLevel: String -lateinit var topLevelMutable: String - -public interface Intf { - lateinit var str: String -} - -public abstract class AbstractClass { - abstract var str: String -} - -public class AbstractClassImpl : AbstractClass() { - override lateinit var str: String -} - -public class B { - lateinit var a: String - - init { - a.length - } -} diff --git a/compiler/testData/diagnostics/tests/lateinit/modifierApplicability.kt b/compiler/testData/diagnostics/tests/lateinit/modifierApplicability.kt deleted file mode 100644 index 9eb08172214..00000000000 --- a/compiler/testData/diagnostics/tests/lateinit/modifierApplicability.kt +++ /dev/null @@ -1,71 +0,0 @@ -// !LANGUAGE: -LateinitTopLevelProperties -LateinitLocalVariables -import kotlin.reflect.KProperty - -class CustomDelegate { - operator fun getValue(thisRef: Any?, prop: KProperty<*>): String = prop.name - operator fun setValue(thisRef: Any?, prop: KProperty<*>, value: String) {} -} - -public abstract class A(lateinit var p2: String) { - - public lateinit val a: String - lateinit val b: T - private lateinit var c: CharSequence - - lateinit val d: String - get - - public lateinit var e: String - get - private set - - fun a() { - lateinit var a: String - } - - lateinit var e1: V - lateinit var e2: String? - lateinit var e3: Int - lateinit var e4: Int? - lateinit var e5 = "A" - - // With initializer, primitive - lateinit var e6 = 3 - - lateinit var e7 by CustomDelegate() - - lateinit var e8: String - get() = "A" - - lateinit var e9: String - set(v) { field = v } - - abstract lateinit var e10: String - - lateinit var String.e11: String - - lateinit var String.e12: String -} - -lateinit val topLevel: String -lateinit var topLevelMutable: String - -public interface Intf { - lateinit var str: String -} - -public abstract class AbstractClass { - abstract var str: String -} - -public class AbstractClassImpl : AbstractClass() { - override lateinit var str: String -} - -public class B { - lateinit var a: String - - init { - a.length - } -} diff --git a/compiler/testData/diagnostics/tests/lateinit/modifierApplicability.txt b/compiler/testData/diagnostics/tests/lateinit/modifierApplicability.txt deleted file mode 100644 index 17e549155e6..00000000000 --- a/compiler/testData/diagnostics/tests/lateinit/modifierApplicability.txt +++ /dev/null @@ -1,70 +0,0 @@ -package - -public lateinit val topLevel: kotlin.String -public lateinit var topLevelMutable: kotlin.String - -public abstract class A { - public constructor A(/*0*/ p2: kotlin.String) - public final lateinit val a: kotlin.String - public final lateinit val b: T - private final lateinit var c: kotlin.CharSequence - public final lateinit val d: kotlin.String - public final lateinit var e: kotlin.String - public final lateinit var e1: V - public abstract lateinit var e10: kotlin.String - public final lateinit var e2: kotlin.String? - public final lateinit var e3: kotlin.Int - public final lateinit var e4: kotlin.Int? - public final lateinit var e5: kotlin.String - public final lateinit var e6: kotlin.Int - public final lateinit var e7: kotlin.String - public final lateinit var e8: kotlin.String - public final lateinit var e9: kotlin.String - public final var p2: kotlin.String - public final lateinit var kotlin.String.e11: kotlin.String - public final lateinit var kotlin.String.e12: kotlin.String - public final fun a(): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} - -public abstract class AbstractClass { - public constructor AbstractClass() - public abstract var str: kotlin.String - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} - -public final class AbstractClassImpl : AbstractClass { - public constructor AbstractClassImpl() - public open override /*1*/ lateinit var str: kotlin.String - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} - -public final class B { - public constructor B() - public final lateinit var a: kotlin.String - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} - -public final class CustomDelegate { - public constructor CustomDelegate() - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public final operator fun getValue(/*0*/ thisRef: kotlin.Any?, /*1*/ prop: kotlin.reflect.KProperty<*>): kotlin.String - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public final operator fun setValue(/*0*/ thisRef: kotlin.Any?, /*1*/ prop: kotlin.reflect.KProperty<*>, /*2*/ value: kotlin.String): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} - -public interface Intf { - public abstract lateinit var str: kotlin.String - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} diff --git a/compiler/testData/diagnostics/tests/modifiers/const/noDivisionByZeroFeature.fir.kt b/compiler/testData/diagnostics/tests/modifiers/const/noDivisionByZeroFeature.fir.kt deleted file mode 100644 index ac0f05a19a4..00000000000 --- a/compiler/testData/diagnostics/tests/modifiers/const/noDivisionByZeroFeature.fir.kt +++ /dev/null @@ -1,19 +0,0 @@ -// !LANGUAGE: -DivisionByZeroInConstantExpressions -// !DIAGNOSTICS:-DIVISION_BY_ZERO - -const val a = 1 / 0.0 -const val b = 1.0 / 0 -const val c = 0.0 / 0 -const val d = 1.0 % 0 -const val e = 0.0 % 0 -const val g = 0.0.rem(0) -const val h = 0.0.div(0) - -const val i = 1 / 0 - -val nonConst1 = 1.0 / 0 -val nonConst2 = 1 / 0 -val nonConst3 = 1.0 % 0 -val nonConst4 = 1 % 0 -val nonConst6 = 1.rem(0) -val nonConst7 = 1.div(0) diff --git a/compiler/testData/diagnostics/tests/modifiers/const/noDivisionByZeroFeature.kt b/compiler/testData/diagnostics/tests/modifiers/const/noDivisionByZeroFeature.kt deleted file mode 100644 index cf5f26ff6cb..00000000000 --- a/compiler/testData/diagnostics/tests/modifiers/const/noDivisionByZeroFeature.kt +++ /dev/null @@ -1,19 +0,0 @@ -// !LANGUAGE: -DivisionByZeroInConstantExpressions -// !DIAGNOSTICS:-DIVISION_BY_ZERO - -const val a = 1 / 0.0 -const val b = 1.0 / 0 -const val c = 0.0 / 0 -const val d = 1.0 % 0 -const val e = 0.0 % 0 -const val g = 0.0.rem(0) -const val h = 0.0.div(0) - -const val i = 1 / 0 - -val nonConst1 = 1.0 / 0 -val nonConst2 = 1 / 0 -val nonConst3 = 1.0 % 0 -val nonConst4 = 1 % 0 -val nonConst6 = 1.rem(0) -val nonConst7 = 1.div(0) diff --git a/compiler/testData/diagnostics/tests/modifiers/const/noDivisionByZeroFeature.txt b/compiler/testData/diagnostics/tests/modifiers/const/noDivisionByZeroFeature.txt deleted file mode 100644 index 1896afbb001..00000000000 --- a/compiler/testData/diagnostics/tests/modifiers/const/noDivisionByZeroFeature.txt +++ /dev/null @@ -1,16 +0,0 @@ -package - -public const val a: kotlin.Double -public const val b: kotlin.Double -public const val c: kotlin.Double -public const val d: kotlin.Double -public const val e: kotlin.Double -public const val g: kotlin.Double -public const val h: kotlin.Double -public const val i: kotlin.Int -public val nonConst1: kotlin.Double -public val nonConst2: kotlin.Int -public val nonConst3: kotlin.Double -public val nonConst4: kotlin.Int -public val nonConst6: kotlin.Int -public val nonConst7: kotlin.Int diff --git a/compiler/testData/diagnostics/tests/operatorRem/noDeprecatedModConventionWithoutFeature.fir.kt b/compiler/testData/diagnostics/tests/operatorRem/noDeprecatedModConventionWithoutFeature.fir.kt deleted file mode 100644 index 21117f45dd6..00000000000 --- a/compiler/testData/diagnostics/tests/operatorRem/noDeprecatedModConventionWithoutFeature.fir.kt +++ /dev/null @@ -1,38 +0,0 @@ -// !LANGUAGE: -OperatorRem -// !DIAGNOSTICS: -UNUSED_PARAMETER - -object ModAndRem { - operator fun mod(x: Int) {} - operator fun rem(x: Int) {} -} - -object OldMod { - operator fun mod(x: Int) {} -} - -object ModAndRemExtension -operator fun ModAndRemExtension.mod(x: Int) {} -operator fun ModAndRemExtension.rem(x: Int) {} - -object ModExtension -operator fun ModExtension.mod(x: Int) {} - -object ModMemberAndRemExtension { - operator fun mod(x: Int) {} -} - -operator fun ModMemberAndRemExtension.rem(x: Int) {} - -fun foo() { - ModAndRem % 1 - OldMod % 1 - - ModAndRemExtension % 1 - - ModExtension % 1 - - ModMemberAndRemExtension % 1 - - OldMod.mod(1) - ModExtension.mod(1) -} diff --git a/compiler/testData/diagnostics/tests/operatorRem/noDeprecatedModConventionWithoutFeature.kt b/compiler/testData/diagnostics/tests/operatorRem/noDeprecatedModConventionWithoutFeature.kt deleted file mode 100644 index 6bea766e865..00000000000 --- a/compiler/testData/diagnostics/tests/operatorRem/noDeprecatedModConventionWithoutFeature.kt +++ /dev/null @@ -1,38 +0,0 @@ -// !LANGUAGE: -OperatorRem -// !DIAGNOSTICS: -UNUSED_PARAMETER - -object ModAndRem { - operator fun mod(x: Int) {} - operator fun rem(x: Int) {} -} - -object OldMod { - operator fun mod(x: Int) {} -} - -object ModAndRemExtension -operator fun ModAndRemExtension.mod(x: Int) {} -operator fun ModAndRemExtension.rem(x: Int) {} - -object ModExtension -operator fun ModExtension.mod(x: Int) {} - -object ModMemberAndRemExtension { - operator fun mod(x: Int) {} -} - -operator fun ModMemberAndRemExtension.rem(x: Int) {} - -fun foo() { - ModAndRem % 1 - OldMod % 1 - - ModAndRemExtension % 1 - - ModExtension % 1 - - ModMemberAndRemExtension % 1 - - OldMod.mod(1) - ModExtension.mod(1) -} diff --git a/compiler/testData/diagnostics/tests/operatorRem/noDeprecatedModConventionWithoutFeature.txt b/compiler/testData/diagnostics/tests/operatorRem/noDeprecatedModConventionWithoutFeature.txt deleted file mode 100644 index 2a30499e505..00000000000 --- a/compiler/testData/diagnostics/tests/operatorRem/noDeprecatedModConventionWithoutFeature.txt +++ /dev/null @@ -1,46 +0,0 @@ -package - -public fun foo(): kotlin.Unit -public operator fun ModAndRemExtension.mod(/*0*/ x: kotlin.Int): kotlin.Unit -public operator fun ModExtension.mod(/*0*/ x: kotlin.Int): kotlin.Unit -public operator fun ModAndRemExtension.rem(/*0*/ x: kotlin.Int): kotlin.Unit -public operator fun ModMemberAndRemExtension.rem(/*0*/ x: kotlin.Int): kotlin.Unit - -public object ModAndRem { - private constructor ModAndRem() - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public final operator fun mod(/*0*/ x: kotlin.Int): kotlin.Unit - public final operator fun rem(/*0*/ x: kotlin.Int): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} - -public object ModAndRemExtension { - private constructor ModAndRemExtension() - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} - -public object ModExtension { - private constructor ModExtension() - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} - -public object ModMemberAndRemExtension { - private constructor ModMemberAndRemExtension() - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public final operator fun mod(/*0*/ x: kotlin.Int): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} - -public object OldMod { - private constructor OldMod() - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public final operator fun mod(/*0*/ x: kotlin.Int): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} diff --git a/compiler/testData/diagnostics/tests/operatorRem/noOperatorRemFeature.fir.kt b/compiler/testData/diagnostics/tests/operatorRem/noOperatorRemFeature.fir.kt deleted file mode 100644 index e3eca658b92..00000000000 --- a/compiler/testData/diagnostics/tests/operatorRem/noOperatorRemFeature.fir.kt +++ /dev/null @@ -1,32 +0,0 @@ -// !LANGUAGE: -OperatorRem -// !DIAGNOSTICS: -UNUSED_PARAMETER, -UNUSED_VARIABLE, -EXTENSION_SHADOWED_BY_MEMBER - -class Foo { - operator fun rem(x: Int): Foo = Foo() -} - -class Bar { - operator fun remAssign(x: Int) {} -} - -class Baz { - companion object { - operator fun rem(x: Int) {} - operator fun Int.rem(x: Int) {} - } -} - -operator fun Baz.rem(x: Int) {} - -fun local() { - operator fun Int.rem(x: Int) {} - operator fun String.remAssign(x: Int) {} -} - -fun builtIns(b: Byte, s: Short) { - var a = 1 % 2 - var d = 5 - d %= 3 - b % s - 1.0 % 2.0 -} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/operatorRem/noOperatorRemFeature.kt b/compiler/testData/diagnostics/tests/operatorRem/noOperatorRemFeature.kt deleted file mode 100644 index dbcf2933ddf..00000000000 --- a/compiler/testData/diagnostics/tests/operatorRem/noOperatorRemFeature.kt +++ /dev/null @@ -1,32 +0,0 @@ -// !LANGUAGE: -OperatorRem -// !DIAGNOSTICS: -UNUSED_PARAMETER, -UNUSED_VARIABLE, -EXTENSION_SHADOWED_BY_MEMBER - -class Foo { - operator fun rem(x: Int): Foo = Foo() -} - -class Bar { - operator fun remAssign(x: Int) {} -} - -class Baz { - companion object { - operator fun rem(x: Int) {} - operator fun Int.rem(x: Int) {} - } -} - -operator fun Baz.rem(x: Int) {} - -fun local() { - operator fun Int.rem(x: Int) {} - operator fun String.remAssign(x: Int) {} -} - -fun builtIns(b: Byte, s: Short) { - var a = 1 % 2 - var d = 5 - d %= 3 - b % s - 1.0 % 2.0 -} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/operatorRem/noOperatorRemFeature.txt b/compiler/testData/diagnostics/tests/operatorRem/noOperatorRemFeature.txt deleted file mode 100644 index 854157cf360..00000000000 --- a/compiler/testData/diagnostics/tests/operatorRem/noOperatorRemFeature.txt +++ /dev/null @@ -1,37 +0,0 @@ -package - -public fun builtIns(/*0*/ b: kotlin.Byte, /*1*/ s: kotlin.Short): kotlin.Unit -public fun local(): kotlin.Unit -public operator fun Baz.rem(/*0*/ x: kotlin.Int): kotlin.Unit - -public final class Bar { - public constructor Bar() - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public final operator fun remAssign(/*0*/ x: kotlin.Int): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} - -public final class Baz { - public constructor Baz() - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - - public companion object Companion { - private constructor Companion() - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public final operator fun rem(/*0*/ x: kotlin.Int): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - public final operator fun kotlin.Int.rem(/*0*/ x: kotlin.Int): kotlin.Unit - } -} - -public final class Foo { - public constructor Foo() - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public final operator fun rem(/*0*/ x: kotlin.Int): Foo - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} diff --git a/compiler/testData/diagnostics/tests/operatorRem/resolveToModWhenNoOperatorRemFeature.fir.kt b/compiler/testData/diagnostics/tests/operatorRem/resolveToModWhenNoOperatorRemFeature.fir.kt deleted file mode 100644 index f0ff5155834..00000000000 --- a/compiler/testData/diagnostics/tests/operatorRem/resolveToModWhenNoOperatorRemFeature.fir.kt +++ /dev/null @@ -1,39 +0,0 @@ -// !LANGUAGE: -OperatorRem -// !DIAGNOSTICS: -UNUSED_PARAMETER - -object ModAndRem { - operator fun mod(x: Int) = 0 - operator fun rem(x: Int) = "" -} - -object ModAssignAndRemAssign { - operator fun modAssign(x: String) {} - operator fun remAssign(x: Int) {} -} - -object RemAndModAssign { - operator fun modAssign(x: Int) {} - operator fun rem(x: Int) = RemAndModAssign -} - -object OnlyRem { - operator fun rem(x: Int) {} - operator fun remAssign(x: Int) {} -} - -fun test() { - takeInt(ModAndRem % 1) - - val c = ModAssignAndRemAssign - c %= "" - - var c1 = RemAndModAssign - c1 %= 1 - - OnlyRem % 1 - - val c2 = OnlyRem - c2 %= 1 -} - -fun takeInt(x: Int) {} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/operatorRem/resolveToModWhenNoOperatorRemFeature.kt b/compiler/testData/diagnostics/tests/operatorRem/resolveToModWhenNoOperatorRemFeature.kt deleted file mode 100644 index e1a29748c33..00000000000 --- a/compiler/testData/diagnostics/tests/operatorRem/resolveToModWhenNoOperatorRemFeature.kt +++ /dev/null @@ -1,39 +0,0 @@ -// !LANGUAGE: -OperatorRem -// !DIAGNOSTICS: -UNUSED_PARAMETER - -object ModAndRem { - operator fun mod(x: Int) = 0 - operator fun rem(x: Int) = "" -} - -object ModAssignAndRemAssign { - operator fun modAssign(x: String) {} - operator fun remAssign(x: Int) {} -} - -object RemAndModAssign { - operator fun modAssign(x: Int) {} - operator fun rem(x: Int) = RemAndModAssign -} - -object OnlyRem { - operator fun rem(x: Int) {} - operator fun remAssign(x: Int) {} -} - -fun test() { - takeInt(ModAndRem % 1) - - val c = ModAssignAndRemAssign - c %= "" - - var c1 = RemAndModAssign - c1 %= 1 - - OnlyRem % 1 - - val c2 = OnlyRem - c2 %= 1 -} - -fun takeInt(x: Int) {} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/operatorRem/resolveToModWhenNoOperatorRemFeature.txt b/compiler/testData/diagnostics/tests/operatorRem/resolveToModWhenNoOperatorRemFeature.txt deleted file mode 100644 index 2627be97f57..00000000000 --- a/compiler/testData/diagnostics/tests/operatorRem/resolveToModWhenNoOperatorRemFeature.txt +++ /dev/null @@ -1,40 +0,0 @@ -package - -public fun takeInt(/*0*/ x: kotlin.Int): kotlin.Unit -public fun test(): kotlin.Unit - -public object ModAndRem { - private constructor ModAndRem() - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public final operator fun mod(/*0*/ x: kotlin.Int): kotlin.Int - public final operator fun rem(/*0*/ x: kotlin.Int): kotlin.String - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} - -public object ModAssignAndRemAssign { - private constructor ModAssignAndRemAssign() - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public final operator fun modAssign(/*0*/ x: kotlin.String): kotlin.Unit - public final operator fun remAssign(/*0*/ x: kotlin.Int): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} - -public object OnlyRem { - private constructor OnlyRem() - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public final operator fun rem(/*0*/ x: kotlin.Int): kotlin.Unit - public final operator fun remAssign(/*0*/ x: kotlin.Int): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} - -public object RemAndModAssign { - private constructor RemAndModAssign() - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public final operator fun modAssign(/*0*/ x: kotlin.Int): kotlin.Unit - public final operator fun rem(/*0*/ x: kotlin.Int): RemAndModAssign - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} diff --git a/compiler/testData/diagnostics/tests/properties/inferenceFromGetters/unsupportedInferenceFromGetters.fir.kt b/compiler/testData/diagnostics/tests/properties/inferenceFromGetters/unsupportedInferenceFromGetters.fir.kt deleted file mode 100644 index d2f8831090f..00000000000 --- a/compiler/testData/diagnostics/tests/properties/inferenceFromGetters/unsupportedInferenceFromGetters.fir.kt +++ /dev/null @@ -1,70 +0,0 @@ -// !LANGUAGE: -ShortSyntaxForPropertyGetters -// NI_EXPECTED_FILE - -// blockBodyGetter.kt -val x get() { - return 1 -} - -// cantBeInferred.kt -val x1 get() = foo() -val y1 get() = bar() - -fun foo(): E = null!! -fun bar(): List = null!! - -// explicitGetterType.kt -val x2 get(): String = foo() -val y2 get(): List = bar() -val z2 get(): List { - return bar() -} - -val u get(): String = field - -// members.kt -class A { - val x get() = 1 - val y get() = id(1) - val y2 get() = id(id(2)) - val z get() = l("") - val z2 get() = l(id(l(""))) - - val T.u get() = id(this) -} -fun id(x: E) = x -fun l(x: E): List = null!! - -// vars -var x3 - get() = 1 - set(q) { - } - -// recursive -val x4 get() = x4 - -// null as nothing -val x5 get() = null -val y5 get() = null!! - -// objectExpression.kt -object Outer { - private var x - get() = object : CharSequence { - override val length: Int - get() = 0 - - override fun get(index: Int): Char { - return ' ' - } - - override fun subSequence(startIndex: Int, endIndex: Int) = "" - - fun bar() { - } - } - set(q) { - x = q - } -} diff --git a/compiler/testData/diagnostics/tests/properties/inferenceFromGetters/unsupportedInferenceFromGetters.kt b/compiler/testData/diagnostics/tests/properties/inferenceFromGetters/unsupportedInferenceFromGetters.kt deleted file mode 100644 index dcda83cf847..00000000000 --- a/compiler/testData/diagnostics/tests/properties/inferenceFromGetters/unsupportedInferenceFromGetters.kt +++ /dev/null @@ -1,70 +0,0 @@ -// !LANGUAGE: -ShortSyntaxForPropertyGetters -// NI_EXPECTED_FILE - -// blockBodyGetter.kt -val x get() { - return 1 -} - -// cantBeInferred.kt -val x1 get() = foo() -val y1 get() = bar() - -fun foo(): E = null!! -fun bar(): List = null!! - -// explicitGetterType.kt -val x2 get(): String = foo() -val y2 get(): List = bar() -val z2 get(): List { - return bar() -} - -val u get(): String = field - -// members.kt -class A { - val x get() = 1 - val y get() = id(1) - val y2 get() = id(id(2)) - val z get() = l("") - val z2 get() = l(id(l(""))) - - val T.u get() = id(this) -} -fun id(x: E) = x -fun l(x: E): List = null!! - -// vars -var x3 - get() = 1 - set(q) { - } - -// recursive -val x4 get() = x4 - -// null as nothing -val x5 get() = null -val y5 get() = null!! - -// objectExpression.kt -object Outer { - private var x - get() = object : CharSequence { - override val length: Int - get() = 0 - - override fun get(index: Int): Char { - return ' ' - } - - override fun subSequence(startIndex: Int, endIndex: Int) = "" - - fun bar() { - } - } - set(q) { - x = q - } -} diff --git a/compiler/testData/diagnostics/tests/resolve/dslMarker/unsupportedFeature.fir.kt b/compiler/testData/diagnostics/tests/resolve/dslMarker/unsupportedFeature.fir.kt deleted file mode 100644 index 1ad3b745272..00000000000 --- a/compiler/testData/diagnostics/tests/resolve/dslMarker/unsupportedFeature.fir.kt +++ /dev/null @@ -1,28 +0,0 @@ -// !LANGUAGE: -DslMarkersSupport -// !DIAGNOSTICS: -UNUSED_PARAMETER -@DslMarker -annotation class Ann - -@Ann -class A { - fun a() = 1 -} - -@Ann -class B { - fun b() = 2 -} - -fun foo(x: A.() -> Unit) {} -fun bar(x: B.() -> Unit) {} - -fun test() { - foo { - a() - bar { - a() - this@foo.a() - b() - } - } -} diff --git a/compiler/testData/diagnostics/tests/resolve/dslMarker/unsupportedFeature.kt b/compiler/testData/diagnostics/tests/resolve/dslMarker/unsupportedFeature.kt deleted file mode 100644 index e67767e06d7..00000000000 --- a/compiler/testData/diagnostics/tests/resolve/dslMarker/unsupportedFeature.kt +++ /dev/null @@ -1,28 +0,0 @@ -// !LANGUAGE: -DslMarkersSupport -// !DIAGNOSTICS: -UNUSED_PARAMETER -@DslMarker -annotation class Ann - -@Ann -class A { - fun a() = 1 -} - -@Ann -class B { - fun b() = 2 -} - -fun foo(x: A.() -> Unit) {} -fun bar(x: B.() -> Unit) {} - -fun test() { - foo { - a() - bar { - a() - this@foo.a() - b() - } - } -} diff --git a/compiler/testData/diagnostics/tests/resolve/dslMarker/unsupportedFeature.txt b/compiler/testData/diagnostics/tests/resolve/dslMarker/unsupportedFeature.txt deleted file mode 100644 index 7ca439a2bc5..00000000000 --- a/compiler/testData/diagnostics/tests/resolve/dslMarker/unsupportedFeature.txt +++ /dev/null @@ -1,28 +0,0 @@ -package - -public fun bar(/*0*/ x: B.() -> kotlin.Unit): kotlin.Unit -public fun foo(/*0*/ x: A.() -> kotlin.Unit): kotlin.Unit -public fun test(): kotlin.Unit - -@Ann public final class A { - public constructor A() - public final fun a(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} - -@kotlin.DslMarker public final annotation class Ann : kotlin.Annotation { - public constructor Ann() - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} - -@Ann public final class B { - public constructor B() - public final fun b(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} diff --git a/compiler/testData/diagnostics/tests/smartCasts/castchecks/basicOff.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/castchecks/basicOff.fir.kt deleted file mode 100644 index 41dea08871d..00000000000 --- a/compiler/testData/diagnostics/tests/smartCasts/castchecks/basicOff.fir.kt +++ /dev/null @@ -1,36 +0,0 @@ -// !LANGUAGE: -SafeCastCheckBoundSmartCasts - -interface SomeClass { - val data: Any? -} - -interface SomeSubClass : SomeClass { - val foo: Any? -} - -fun g(a: SomeClass?) { - if (a as? SomeSubClass != null) { - // 'a' can be cast to SomeSubClass - a.hashCode() - a.foo - (a as? SomeSubClass).foo - (a as SomeSubClass).foo - } - val b = (a as? SomeSubClass)?.foo - if (b != null) { - // 'a' can be cast to SomeSubClass - a.hashCode() - a.foo - (a as? SomeSubClass).foo - (a as SomeSubClass).foo - } - val c = a as? SomeSubClass - if (c != null) { - // 'a' and 'c' can be cast to SomeSubClass - a.hashCode() - a.foo - (a as? SomeSubClass).foo - c.hashCode() - c.foo - } -} diff --git a/compiler/testData/diagnostics/tests/smartCasts/castchecks/basicOff.kt b/compiler/testData/diagnostics/tests/smartCasts/castchecks/basicOff.kt deleted file mode 100644 index 22fe9c57353..00000000000 --- a/compiler/testData/diagnostics/tests/smartCasts/castchecks/basicOff.kt +++ /dev/null @@ -1,36 +0,0 @@ -// !LANGUAGE: -SafeCastCheckBoundSmartCasts - -interface SomeClass { - val data: Any? -} - -interface SomeSubClass : SomeClass { - val foo: Any? -} - -fun g(a: SomeClass?) { - if (a as? SomeSubClass != null) { - // 'a' can be cast to SomeSubClass - a.hashCode() - a.foo - (a as? SomeSubClass).foo - (a as SomeSubClass).foo - } - val b = (a as? SomeSubClass)?.foo - if (b != null) { - // 'a' can be cast to SomeSubClass - a.hashCode() - a.foo - (a as? SomeSubClass).foo - (a as SomeSubClass).foo - } - val c = a as? SomeSubClass - if (c != null) { - // 'a' and 'c' can be cast to SomeSubClass - a.hashCode() - a.foo - (a as? SomeSubClass).foo - c.hashCode() - c.foo - } -} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/smartCasts/castchecks/basicOff.txt b/compiler/testData/diagnostics/tests/smartCasts/castchecks/basicOff.txt deleted file mode 100644 index 583c561c362..00000000000 --- a/compiler/testData/diagnostics/tests/smartCasts/castchecks/basicOff.txt +++ /dev/null @@ -1,18 +0,0 @@ -package - -public fun g(/*0*/ a: SomeClass?): kotlin.Unit - -public interface SomeClass { - public abstract val data: kotlin.Any? - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} - -public interface SomeSubClass : SomeClass { - public abstract override /*1*/ /*fake_override*/ val data: kotlin.Any? - public abstract val foo: kotlin.Any? - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} diff --git a/compiler/testData/diagnostics/tests/smartCasts/level_1_0.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/level_1_0.fir.kt deleted file mode 100644 index b77282ddb4b..00000000000 --- a/compiler/testData/diagnostics/tests/smartCasts/level_1_0.fir.kt +++ /dev/null @@ -1,52 +0,0 @@ -// !LANGUAGE: -SafeCallBoundSmartCasts - -fun foo(arg: Int?) { - val x = arg - if (x != null) { - arg.hashCode() - } - val y: Any? = arg - if (y != null) { - arg.hashCode() - } - val yy: Any? - yy = arg - if (yy != null) { - arg.hashCode() - } - var z = arg - z = z?.let { 42 } - if (z != null) { - arg.hashCode() - } -} - -fun kt6840_1(s: String?) { - val hash = s?.hashCode() - if (hash != null) { - s.length - } -} - -fun kt6840_2(s: String?) { - if (s?.hashCode() != null) { - s.length - } -} - -fun kt1635(s: String?) { - s?.hashCode()!! - s.hashCode() -} - -fun kt2127() { - val s: String? = "" - if (s?.length != null) { - s.hashCode() - } -} - -fun kt3356(s: String?): Int { - if (s?.length != 1) return 0 - return s.length -} diff --git a/compiler/testData/diagnostics/tests/smartCasts/level_1_0.kt b/compiler/testData/diagnostics/tests/smartCasts/level_1_0.kt deleted file mode 100644 index 5e61f53943b..00000000000 --- a/compiler/testData/diagnostics/tests/smartCasts/level_1_0.kt +++ /dev/null @@ -1,52 +0,0 @@ -// !LANGUAGE: -SafeCallBoundSmartCasts - -fun foo(arg: Int?) { - val x = arg - if (x != null) { - arg.hashCode() - } - val y: Any? = arg - if (y != null) { - arg.hashCode() - } - val yy: Any? - yy = arg - if (yy != null) { - arg.hashCode() - } - var z = arg - z = z?.let { 42 } - if (z != null) { - arg.hashCode() - } -} - -fun kt6840_1(s: String?) { - val hash = s?.hashCode() - if (hash != null) { - s.length - } -} - -fun kt6840_2(s: String?) { - if (s?.hashCode() != null) { - s.length - } -} - -fun kt1635(s: String?) { - s?.hashCode()!! - s.hashCode() -} - -fun kt2127() { - val s: String? = "" - if (s?.length != null) { - s.hashCode() - } -} - -fun kt3356(s: String?): Int { - if (s?.length != 1) return 0 - return s.length -} diff --git a/compiler/testData/diagnostics/tests/smartCasts/level_1_0.txt b/compiler/testData/diagnostics/tests/smartCasts/level_1_0.txt deleted file mode 100644 index e038e7ea036..00000000000 --- a/compiler/testData/diagnostics/tests/smartCasts/level_1_0.txt +++ /dev/null @@ -1,8 +0,0 @@ -package - -public fun foo(/*0*/ arg: kotlin.Int?): kotlin.Unit -public fun kt1635(/*0*/ s: kotlin.String?): kotlin.Unit -public fun kt2127(): kotlin.Unit -public fun kt3356(/*0*/ s: kotlin.String?): kotlin.Int -public fun kt6840_1(/*0*/ s: kotlin.String?): kotlin.Unit -public fun kt6840_2(/*0*/ s: kotlin.String?): kotlin.Unit diff --git a/compiler/testData/diagnostics/tests/smartCasts/safecalls/safeAccessReceiverNotNull.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/safecalls/safeAccessReceiverNotNull.fir.kt deleted file mode 100644 index fc9c8040150..00000000000 --- a/compiler/testData/diagnostics/tests/smartCasts/safecalls/safeAccessReceiverNotNull.fir.kt +++ /dev/null @@ -1,153 +0,0 @@ -// !LANGUAGE: -SafeCastCheckBoundSmartCasts -BooleanElvisBoundSmartCasts -// A set of examples for -// "If the result of a safe call is not null, understand that its receiver is not null" -// and some other improvements for nullability detection - -fun kt6840_1(s: String?) { - val hash = s?.hashCode() - if (hash != null) { - s.length - } -} - -fun kt6840_2(s: String?) { - if (s?.hashCode() != null) { - s.length - } -} - -fun kt1635(s: String?) { - s?.hashCode()!! - s.hashCode() -} - -fun kt2127() { - val s: String? = "" - if (s?.length != null) { - s.hashCode() - } -} - -fun kt3356(s: String?): Int { - if (s?.length != 1) return 0 - return s.length -} - -open class SomeClass(val data: Any) - -class SubClass(val extra: Any, data: Any) : SomeClass(data) - -fun kt4565_1(a: SomeClass?) { - val data = a?.data - if (data != null) { - data.hashCode() - a.hashCode() - a.data.hashCode() - } - if (a?.data != null) { - // To be supported (?!) - data.hashCode() - a.hashCode() - a.data.hashCode() - } - if (a?.data is String) { - a.data.length - data.length - } -} - -fun kt4565_2(a: SomeClass?) { - // To be supported - if (a as? SubClass != null) { - a.extra.hashCode() - } - val extra = (a as? SubClass)?.extra - if (extra != null) { - a.extra.hashCode() - } -} - -inline fun kt45345(a: SomeClass?) { - if (a?.data is T) { - a.data - } -} - -inline fun kt45345_2(a: SomeClass?) { - if (a?.data is T) { - a.data - } -} - -inline fun kt45345_3(a: SomeClass?) { - if (a?.data is T) { - a.data - } -} - -class A(val y: Int) - -fun kt7491_1() { - val x: A? = A(42) - val z = x?.y ?: return - x.y -} - -fun getA(): A? = null -fun useA(a: A): Int = a.hashCode() - -fun kt7491_2() { - val a = getA() - (a?.let { useA(a) } ?: a.y ).toString() -} - -fun String.correct() = true - -fun kt8492(s: String?) { - if (s?.correct() ?: false) { - // To be supported - s.length - } -} - -fun kt11085(prop: String?) { - when (prop?.hashCode()) { - 1 -> prop.length - } -} - -class HttpExchange(val code: String) - -fun kt11313(arg: HttpExchange?) { - when (arg?.code) { - "GET" -> handleGet(arg) - "POST" -> handlePost(arg) - } -} - -fun handleGet(arg: HttpExchange) = arg - -fun handlePost(arg: HttpExchange) = arg - -class Wrapper { - fun unwrap(): String? = "Something not consistent" -} - -fun falsePositive(w: Wrapper) { - if (w.unwrap() != null) { - // Here we should NOT have smart cast - w.unwrap().length - } -} - -class Invokable(val x: String) { - operator fun invoke() = x -} - -class InvokableProperty(val i: Invokable) - -fun checkInvokable(ip: InvokableProperty?) { - if (ip?.i() == "Hello") { - ip.hashCode() - } -} diff --git a/compiler/testData/diagnostics/tests/smartCasts/safecalls/safeAccessReceiverNotNull.kt b/compiler/testData/diagnostics/tests/smartCasts/safecalls/safeAccessReceiverNotNull.kt deleted file mode 100644 index c884bacb6f2..00000000000 --- a/compiler/testData/diagnostics/tests/smartCasts/safecalls/safeAccessReceiverNotNull.kt +++ /dev/null @@ -1,153 +0,0 @@ -// !LANGUAGE: -SafeCastCheckBoundSmartCasts -BooleanElvisBoundSmartCasts -// A set of examples for -// "If the result of a safe call is not null, understand that its receiver is not null" -// and some other improvements for nullability detection - -fun kt6840_1(s: String?) { - val hash = s?.hashCode() - if (hash != null) { - s.length - } -} - -fun kt6840_2(s: String?) { - if (s?.hashCode() != null) { - s.length - } -} - -fun kt1635(s: String?) { - s?.hashCode()!! - s.hashCode() -} - -fun kt2127() { - val s: String? = "" - if (s?.length != null) { - s.hashCode() - } -} - -fun kt3356(s: String?): Int { - if (s?.length != 1) return 0 - return s.length -} - -open class SomeClass(val data: Any) - -class SubClass(val extra: Any, data: Any) : SomeClass(data) - -fun kt4565_1(a: SomeClass?) { - val data = a?.data - if (data != null) { - data.hashCode() - a.hashCode() - a.data.hashCode() - } - if (a?.data != null) { - // To be supported (?!) - data.hashCode() - a.hashCode() - a.data.hashCode() - } - if (a?.data is String) { - a.data.length - data.length - } -} - -fun kt4565_2(a: SomeClass?) { - // To be supported - if (a as? SubClass != null) { - a.extra.hashCode() - } - val extra = (a as? SubClass)?.extra - if (extra != null) { - a.extra.hashCode() - } -} - -inline fun kt45345(a: SomeClass?) { - if (a?.data is T) { - a.data - } -} - -inline fun kt45345_2(a: SomeClass?) { - if (a?.data is T) { - a.data - } -} - -inline fun kt45345_3(a: SomeClass?) { - if (a?.data is T) { - a.data - } -} - -class A(val y: Int) - -fun kt7491_1() { - val x: A? = A(42) - val z = x?.y ?: return - x.y -} - -fun getA(): A? = null -fun useA(a: A): Int = a.hashCode() - -fun kt7491_2() { - val a = getA() - (a?.let { useA(a) } ?: a.y ).toString() -} - -fun String.correct() = true - -fun kt8492(s: String?) { - if (s?.correct() ?: false) { - // To be supported - s.length - } -} - -fun kt11085(prop: String?) { - when (prop?.hashCode()) { - 1 -> prop.length - } -} - -class HttpExchange(val code: String) - -fun kt11313(arg: HttpExchange?) { - when (arg?.code) { - "GET" -> handleGet(arg) - "POST" -> handlePost(arg) - } -} - -fun handleGet(arg: HttpExchange) = arg - -fun handlePost(arg: HttpExchange) = arg - -class Wrapper { - fun unwrap(): String? = "Something not consistent" -} - -fun falsePositive(w: Wrapper) { - if (w.unwrap() != null) { - // Here we should NOT have smart cast - w.unwrap().length - } -} - -class Invokable(val x: String) { - operator fun invoke() = x -} - -class InvokableProperty(val i: Invokable) - -fun checkInvokable(ip: InvokableProperty?) { - if (ip?.i() == "Hello") { - ip.hashCode() - } -} diff --git a/compiler/testData/diagnostics/tests/smartCasts/safecalls/safeAccessReceiverNotNull.txt b/compiler/testData/diagnostics/tests/smartCasts/safecalls/safeAccessReceiverNotNull.txt deleted file mode 100644 index 888f291b963..00000000000 --- a/compiler/testData/diagnostics/tests/smartCasts/safecalls/safeAccessReceiverNotNull.txt +++ /dev/null @@ -1,82 +0,0 @@ -package - -public fun checkInvokable(/*0*/ ip: InvokableProperty?): kotlin.Unit -public fun falsePositive(/*0*/ w: Wrapper): kotlin.Unit -public fun getA(): A? -public fun handleGet(/*0*/ arg: HttpExchange): HttpExchange -public fun handlePost(/*0*/ arg: HttpExchange): HttpExchange -public fun kt11085(/*0*/ prop: kotlin.String?): kotlin.Unit -public fun kt11313(/*0*/ arg: HttpExchange?): kotlin.Unit -public fun kt1635(/*0*/ s: kotlin.String?): kotlin.Unit -public fun kt2127(): kotlin.Unit -public fun kt3356(/*0*/ s: kotlin.String?): kotlin.Int -public inline fun kt45345(/*0*/ a: SomeClass?): kotlin.Unit -public inline fun kt45345_2(/*0*/ a: SomeClass?): kotlin.Unit -public inline fun kt45345_3(/*0*/ a: SomeClass?): kotlin.Unit -public fun kt4565_1(/*0*/ a: SomeClass?): kotlin.Unit -public fun kt4565_2(/*0*/ a: SomeClass?): kotlin.Unit -public fun kt6840_1(/*0*/ s: kotlin.String?): kotlin.Unit -public fun kt6840_2(/*0*/ s: kotlin.String?): kotlin.Unit -public fun kt7491_1(): kotlin.Unit -public fun kt7491_2(): kotlin.Unit -public fun kt8492(/*0*/ s: kotlin.String?): kotlin.Unit -public fun useA(/*0*/ a: A): kotlin.Int -public fun kotlin.String.correct(): kotlin.Boolean - -public final class A { - public constructor A(/*0*/ y: kotlin.Int) - public final val y: kotlin.Int - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} - -public final class HttpExchange { - public constructor HttpExchange(/*0*/ code: kotlin.String) - public final val code: kotlin.String - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} - -public final class Invokable { - public constructor Invokable(/*0*/ x: kotlin.String) - public final val x: kotlin.String - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public final operator fun invoke(): kotlin.String - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} - -public final class InvokableProperty { - public constructor InvokableProperty(/*0*/ i: Invokable) - public final val i: Invokable - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} - -public open class SomeClass { - public constructor SomeClass(/*0*/ data: kotlin.Any) - public final val data: kotlin.Any - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} - -public final class SubClass : SomeClass { - public constructor SubClass(/*0*/ extra: kotlin.Any, /*1*/ data: kotlin.Any) - public final override /*1*/ /*fake_override*/ val data: kotlin.Any - public final val extra: kotlin.Any - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} - -public final class Wrapper { - public constructor Wrapper() - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - public final fun unwrap(): kotlin.String? -} diff --git a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/capturedInClosureOff.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/capturedInClosureOff.fir.kt deleted file mode 100644 index 74294986b9a..00000000000 --- a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/capturedInClosureOff.fir.kt +++ /dev/null @@ -1,15 +0,0 @@ -// !LANGUAGE: -CapturedInClosureSmartCasts - -fun run(f: () -> Unit) = f() - -fun foo(s: String?) { - var x: String? = null - if (s != null) { - x = s - } - if (x != null) { - run { - x.hashCode() - } - } -} diff --git a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/capturedInClosureOff.kt b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/capturedInClosureOff.kt deleted file mode 100644 index 808ac0518b6..00000000000 --- a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/capturedInClosureOff.kt +++ /dev/null @@ -1,15 +0,0 @@ -// !LANGUAGE: -CapturedInClosureSmartCasts - -fun run(f: () -> Unit) = f() - -fun foo(s: String?) { - var x: String? = null - if (s != null) { - x = s - } - if (x != null) { - run { - x.hashCode() - } - } -} diff --git a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/capturedInClosureOff.txt b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/capturedInClosureOff.txt deleted file mode 100644 index 7f36b02f85d..00000000000 --- a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/capturedInClosureOff.txt +++ /dev/null @@ -1,4 +0,0 @@ -package - -public fun foo(/*0*/ s: kotlin.String?): kotlin.Unit -public fun run(/*0*/ f: () -> kotlin.Unit): kotlin.Unit diff --git a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/setNullInTryUnsound.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/setNullInTryUnsound.fir.kt deleted file mode 100644 index f5822f0adb9..00000000000 --- a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/setNullInTryUnsound.fir.kt +++ /dev/null @@ -1,10 +0,0 @@ -// !LANGUAGE: -SoundSmartCastsAfterTry - -fun foo() { - var s: String? - s = "Test" - try { - s = null - } catch (ex: Exception) {} - s.hashCode() -} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/setNullInTryUnsound.kt b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/setNullInTryUnsound.kt deleted file mode 100644 index 34746963d1c..00000000000 --- a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/setNullInTryUnsound.kt +++ /dev/null @@ -1,10 +0,0 @@ -// !LANGUAGE: -SoundSmartCastsAfterTry - -fun foo() { - var s: String? - s = "Test" - try { - s = null - } catch (ex: Exception) {} - s.hashCode() -} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/setNullInTryUnsound.txt b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/setNullInTryUnsound.txt deleted file mode 100644 index 65a6ac47e1f..00000000000 --- a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/setNullInTryUnsound.txt +++ /dev/null @@ -1,3 +0,0 @@ -package - -public fun foo(): kotlin.Unit diff --git a/compiler/testData/diagnostics/tests/sourceCompatibility/inlineFunctionAlways.kt b/compiler/testData/diagnostics/tests/sourceCompatibility/inlineFunctionAlways.kt deleted file mode 100644 index e4a80e66059..00000000000 --- a/compiler/testData/diagnostics/tests/sourceCompatibility/inlineFunctionAlways.kt +++ /dev/null @@ -1,17 +0,0 @@ -// FIR_IDENTICAL -// !DIAGNOSTICS: -NOTHING_TO_INLINE -// !LANGUAGE: -InlineProperties - -inline fun String.test() { -} - -inline fun test() { -} - -class A { - inline fun String.test() { - } - - inline fun test() { - } -} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/sourceCompatibility/inlineFunctionAlways.txt b/compiler/testData/diagnostics/tests/sourceCompatibility/inlineFunctionAlways.txt deleted file mode 100644 index ad6ac66084f..00000000000 --- a/compiler/testData/diagnostics/tests/sourceCompatibility/inlineFunctionAlways.txt +++ /dev/null @@ -1,13 +0,0 @@ -package - -public inline fun test(): kotlin.Unit -public inline fun kotlin.String.test(): kotlin.Unit - -public final class A { - public constructor A() - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public final inline fun test(): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - public final inline fun kotlin.String.test(): kotlin.Unit -} diff --git a/compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/boundCallableReference.fir.kt b/compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/boundCallableReference.fir.kt deleted file mode 100644 index fb99289ec37..00000000000 --- a/compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/boundCallableReference.fir.kt +++ /dev/null @@ -1,25 +0,0 @@ -// !LANGUAGE: -BoundCallableReferences - -class C { companion object } -val ok1 = C::hashCode -val fail1 = C.Companion::hashCode - -object O { - class Y { - companion object - } -} -val fail2 = O::hashCode -val ok2 = O::Y -val ok3 = O.Y::hashCode - -enum class E { - Entry -} -val ok4 = E.Entry::hashCode - -fun hashCode() {} - -val fail3 = ""::hashCode -val fail4 = (C)::hashCode -val fail5 = (C.Companion)::hashCode diff --git a/compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/boundCallableReference.kt b/compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/boundCallableReference.kt deleted file mode 100644 index f20cc1a19e1..00000000000 --- a/compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/boundCallableReference.kt +++ /dev/null @@ -1,25 +0,0 @@ -// !LANGUAGE: -BoundCallableReferences - -class C { companion object } -val ok1 = C::hashCode -val fail1 = C.Companion::hashCode - -object O { - class Y { - companion object - } -} -val fail2 = O::hashCode -val ok2 = O::Y -val ok3 = O.Y::hashCode - -enum class E { - Entry -} -val ok4 = E.Entry::hashCode - -fun hashCode() {} - -val fail3 = ""::hashCode -val fail4 = (C)::hashCode -val fail5 = (C.Companion)::hashCode diff --git a/compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/boundCallableReference.txt b/compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/boundCallableReference.txt deleted file mode 100644 index 95b2b594efe..00000000000 --- a/compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/boundCallableReference.txt +++ /dev/null @@ -1,66 +0,0 @@ -package - -public val fail1: kotlin.reflect.KFunction0 -public val fail2: kotlin.reflect.KFunction0 -public val fail3: kotlin.reflect.KFunction0 -public val fail4: kotlin.reflect.KFunction0 -public val fail5: kotlin.reflect.KFunction0 -public val ok1: kotlin.reflect.KFunction1 -public val ok2: kotlin.reflect.KFunction0 -public val ok3: kotlin.reflect.KFunction1 -public val ok4: kotlin.reflect.KFunction1 -public fun hashCode(): kotlin.Unit - -public final class C { - public constructor C() - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - - public companion object Companion { - private constructor Companion() - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - } -} - -public final enum class E : kotlin.Enum { - enum entry Entry - - private constructor E() - public final override /*1*/ /*fake_override*/ val name: kotlin.String - public final override /*1*/ /*fake_override*/ val ordinal: kotlin.Int - protected final override /*1*/ /*fake_override*/ fun clone(): kotlin.Any - public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: E): kotlin.Int - public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - protected/*protected and package*/ final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun finalize(): kotlin.Unit - public final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun getDeclaringClass(): java.lang.Class! - public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - - // Static members - public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): E - public final /*synthesized*/ fun values(): kotlin.Array -} - -public object O { - private constructor O() - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - - public final class Y { - public constructor Y() - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - - public companion object Companion { - private constructor Companion() - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - } - } -} diff --git a/compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/boundClassLiteral.fir.kt b/compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/boundClassLiteral.fir.kt deleted file mode 100644 index 660ac65c9b4..00000000000 --- a/compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/boundClassLiteral.fir.kt +++ /dev/null @@ -1,18 +0,0 @@ -// !LANGUAGE: -BoundCallableReferences - -class C { companion object } -val ok1 = C::class -val ok2 = C.Companion::class - -object O -val ok3 = O::class - -enum class E { - Entry -} -val ok4 = E.Entry::class - -val fail1 = ""::class -val fail2 = String?::class -val fail3 = (C)::class -val fail4 = (C.Companion)::class diff --git a/compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/boundClassLiteral.kt b/compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/boundClassLiteral.kt deleted file mode 100644 index d5371e969fa..00000000000 --- a/compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/boundClassLiteral.kt +++ /dev/null @@ -1,18 +0,0 @@ -// !LANGUAGE: -BoundCallableReferences - -class C { companion object } -val ok1 = C::class -val ok2 = C.Companion::class - -object O -val ok3 = O::class - -enum class E { - Entry -} -val ok4 = E.Entry::class - -val fail1 = ""::class -val fail2 = String?::class -val fail3 = (C)::class -val fail4 = (C.Companion)::class diff --git a/compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/boundClassLiteral.txt b/compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/boundClassLiteral.txt deleted file mode 100644 index 954f1a9a037..00000000000 --- a/compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/boundClassLiteral.txt +++ /dev/null @@ -1,50 +0,0 @@ -package - -public val fail1: kotlin.reflect.KClass -public val fail2: kotlin.reflect.KClass -public val fail3: kotlin.reflect.KClass -public val fail4: kotlin.reflect.KClass -public val ok1: kotlin.reflect.KClass -public val ok2: kotlin.reflect.KClass -public val ok3: kotlin.reflect.KClass -public val ok4: kotlin.reflect.KClass - -public final class C { - public constructor C() - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - - public companion object Companion { - private constructor Companion() - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - } -} - -public final enum class E : kotlin.Enum { - enum entry Entry - - private constructor E() - public final override /*1*/ /*fake_override*/ val name: kotlin.String - public final override /*1*/ /*fake_override*/ val ordinal: kotlin.Int - protected final override /*1*/ /*fake_override*/ fun clone(): kotlin.Any - public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: E): kotlin.Int - public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - protected/*protected and package*/ final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun finalize(): kotlin.Unit - public final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun getDeclaringClass(): java.lang.Class! - public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - - // Static members - public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): E - public final /*synthesized*/ fun values(): kotlin.Array -} - -public object O { - private constructor O() - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} diff --git a/compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/qualifiedJavaClassLiteralInKClassExtension.fir.kt b/compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/qualifiedJavaClassLiteralInKClassExtension.fir.kt deleted file mode 100644 index 83c30e22ae4..00000000000 --- a/compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/qualifiedJavaClassLiteralInKClassExtension.fir.kt +++ /dev/null @@ -1,11 +0,0 @@ -// !LANGUAGE: -BoundCallableReferences -// !DIAGNOSTICS: -UNCHECKED_CAST - -import kotlin.reflect.KClass - -val KClass.java: Class get() = null!! - -val KClass.javaObjectType: Class - get() { - return java.lang.Class::class.java as Class - } diff --git a/compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/qualifiedJavaClassLiteralInKClassExtension.kt b/compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/qualifiedJavaClassLiteralInKClassExtension.kt deleted file mode 100644 index 831a749015f..00000000000 --- a/compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/qualifiedJavaClassLiteralInKClassExtension.kt +++ /dev/null @@ -1,11 +0,0 @@ -// !LANGUAGE: -BoundCallableReferences -// !DIAGNOSTICS: -UNCHECKED_CAST - -import kotlin.reflect.KClass - -val KClass.java: Class get() = null!! - -val KClass.javaObjectType: Class - get() { - return java.lang.Class::class.java as Class - } diff --git a/compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/qualifiedJavaClassLiteralInKClassExtension.txt b/compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/qualifiedJavaClassLiteralInKClassExtension.txt deleted file mode 100644 index 5c0427da0d0..00000000000 --- a/compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/qualifiedJavaClassLiteralInKClassExtension.txt +++ /dev/null @@ -1,4 +0,0 @@ -package - -public val kotlin.reflect.KClass.java: java.lang.Class -public val kotlin.reflect.KClass.javaObjectType: java.lang.Class diff --git a/compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/qualifiedJavaClassReferenceInKClassExtension.fir.kt b/compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/qualifiedJavaClassReferenceInKClassExtension.fir.kt deleted file mode 100644 index c1d56a75632..00000000000 --- a/compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/qualifiedJavaClassReferenceInKClassExtension.fir.kt +++ /dev/null @@ -1,10 +0,0 @@ -// !LANGUAGE: -BoundCallableReferences - -import kotlin.reflect.KClass - -val KClass.java: Class get() = null!! - -val KClass.foo: Any? - get() { - return java.lang.Integer::hashCode - } diff --git a/compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/qualifiedJavaClassReferenceInKClassExtension.kt b/compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/qualifiedJavaClassReferenceInKClassExtension.kt deleted file mode 100644 index 3cdb14768f5..00000000000 --- a/compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/qualifiedJavaClassReferenceInKClassExtension.kt +++ /dev/null @@ -1,10 +0,0 @@ -// !LANGUAGE: -BoundCallableReferences - -import kotlin.reflect.KClass - -val KClass.java: Class get() = null!! - -val KClass.foo: Any? - get() { - return java.lang.Integer::hashCode - } diff --git a/compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/qualifiedJavaClassReferenceInKClassExtension.txt b/compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/qualifiedJavaClassReferenceInKClassExtension.txt deleted file mode 100644 index 6c320b6cdad..00000000000 --- a/compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/qualifiedJavaClassReferenceInKClassExtension.txt +++ /dev/null @@ -1,4 +0,0 @@ -package - -public val kotlin.reflect.KClass.foo: kotlin.Any? -public val kotlin.reflect.KClass.java: java.lang.Class diff --git a/compiler/testData/diagnostics/tests/sourceCompatibility/noCallableReferencesWithEmptyLHS.fir.kt b/compiler/testData/diagnostics/tests/sourceCompatibility/noCallableReferencesWithEmptyLHS.fir.kt deleted file mode 100644 index afe35203131..00000000000 --- a/compiler/testData/diagnostics/tests/sourceCompatibility/noCallableReferencesWithEmptyLHS.fir.kt +++ /dev/null @@ -1,28 +0,0 @@ -// !LANGUAGE: -CallableReferencesToClassMembersWithEmptyLHS - -class A { - fun memberFunction() {} - val memberProperty: Int get() = 42 - - fun test() { - (::memberFunction)() - (::extensionFunction)() - (::memberProperty)() - (::extensionProperty)() - } - - inner class B { - fun memberFunction() { } - val memberProperty: Int get() = 43 - - fun test() { - (::memberFunction)() - (::extensionFunction)() - (::memberProperty)() - (::extensionProperty)() - } - } -} - -fun A.extensionFunction() {} -val A.extensionProperty: Int get() = 44 diff --git a/compiler/testData/diagnostics/tests/sourceCompatibility/noCallableReferencesWithEmptyLHS.kt b/compiler/testData/diagnostics/tests/sourceCompatibility/noCallableReferencesWithEmptyLHS.kt deleted file mode 100644 index 4f66cb839f3..00000000000 --- a/compiler/testData/diagnostics/tests/sourceCompatibility/noCallableReferencesWithEmptyLHS.kt +++ /dev/null @@ -1,28 +0,0 @@ -// !LANGUAGE: -CallableReferencesToClassMembersWithEmptyLHS - -class A { - fun memberFunction() {} - val memberProperty: Int get() = 42 - - fun test() { - (::memberFunction)() - (::extensionFunction)() - (::memberProperty)() - (::extensionProperty)() - } - - inner class B { - fun memberFunction() { } - val memberProperty: Int get() = 43 - - fun test() { - (::memberFunction)() - (::extensionFunction)() - (::memberProperty)() - (::extensionProperty)() - } - } -} - -fun A.extensionFunction() {} -val A.extensionProperty: Int get() = 44 diff --git a/compiler/testData/diagnostics/tests/sourceCompatibility/noCallableReferencesWithEmptyLHS.txt b/compiler/testData/diagnostics/tests/sourceCompatibility/noCallableReferencesWithEmptyLHS.txt deleted file mode 100644 index 79efa06a799..00000000000 --- a/compiler/testData/diagnostics/tests/sourceCompatibility/noCallableReferencesWithEmptyLHS.txt +++ /dev/null @@ -1,24 +0,0 @@ -package - -public val A.extensionProperty: kotlin.Int -public fun A.extensionFunction(): kotlin.Unit - -public final class A { - public constructor A() - public final val memberProperty: kotlin.Int - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public final fun memberFunction(): kotlin.Unit - public final fun test(): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - - public final inner class B { - public constructor B() - public final val memberProperty: kotlin.Int - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public final fun memberFunction(): kotlin.Unit - public final fun test(): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - } -} diff --git a/compiler/testData/diagnostics/tests/sourceCompatibility/noDataClassInheritance.fir.kt b/compiler/testData/diagnostics/tests/sourceCompatibility/noDataClassInheritance.fir.kt deleted file mode 100644 index fa1f9eef8b1..00000000000 --- a/compiler/testData/diagnostics/tests/sourceCompatibility/noDataClassInheritance.fir.kt +++ /dev/null @@ -1,23 +0,0 @@ -// !LANGUAGE: -DataClassInheritance - -interface Allowed - -open class NotAllowed - -abstract data class Base(val x: Int) - -class Derived: Base(42) - -data class Nasty(val z: Int, val y: Int): Base(z) - -data class Complex(val y: Int): Allowed, NotAllowed() - - - -interface AbstractEqualsHashCodeToString { - override fun equals(other: Any?): Boolean - override fun hashCode(): Int - override fun toString(): String -} - -data class ImplInterface(val s: String) : AbstractEqualsHashCodeToString diff --git a/compiler/testData/diagnostics/tests/sourceCompatibility/noDataClassInheritance.kt b/compiler/testData/diagnostics/tests/sourceCompatibility/noDataClassInheritance.kt deleted file mode 100644 index 0030126b1a6..00000000000 --- a/compiler/testData/diagnostics/tests/sourceCompatibility/noDataClassInheritance.kt +++ /dev/null @@ -1,23 +0,0 @@ -// !LANGUAGE: -DataClassInheritance - -interface Allowed - -open class NotAllowed - -abstract data class Base(val x: Int) - -class Derived: Base(42) - -data class Nasty(val z: Int, val y: Int): Base(z) - -data class Complex(val y: Int): Allowed, NotAllowed() - - - -interface AbstractEqualsHashCodeToString { - override fun equals(other: Any?): Boolean - override fun hashCode(): Int - override fun toString(): String -} - -data class ImplInterface(val s: String) : AbstractEqualsHashCodeToString diff --git a/compiler/testData/diagnostics/tests/sourceCompatibility/noDataClassInheritance.txt b/compiler/testData/diagnostics/tests/sourceCompatibility/noDataClassInheritance.txt deleted file mode 100644 index 915c184b476..00000000000 --- a/compiler/testData/diagnostics/tests/sourceCompatibility/noDataClassInheritance.txt +++ /dev/null @@ -1,74 +0,0 @@ -package - -public interface AbstractEqualsHashCodeToString { - public abstract override /*1*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public abstract override /*1*/ fun hashCode(): kotlin.Int - public abstract override /*1*/ fun toString(): kotlin.String -} - -public interface Allowed { - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} - -public abstract data class Base { - public constructor Base(/*0*/ x: kotlin.Int) - public final val x: kotlin.Int - public final operator /*synthesized*/ fun component1(): kotlin.Int - public final /*synthesized*/ fun copy(/*0*/ x: kotlin.Int = ...): Base - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} - -public final data class Complex : Allowed, NotAllowed { - public constructor Complex(/*0*/ y: kotlin.Int) - public final val y: kotlin.Int - public final operator /*synthesized*/ fun component1(): kotlin.Int - public final /*synthesized*/ fun copy(/*0*/ y: kotlin.Int = ...): Complex - public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String -} - -public final class Derived : Base { - public constructor Derived() - public final override /*1*/ /*fake_override*/ val x: kotlin.Int - public final override /*1*/ /*fake_override*/ fun component1(): kotlin.Int - public final override /*1*/ /*fake_override*/ fun copy(/*0*/ x: kotlin.Int = ...): Base - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} - -public final data class ImplInterface : AbstractEqualsHashCodeToString { - public constructor ImplInterface(/*0*/ s: kotlin.String) - public final val s: kotlin.String - public final operator /*synthesized*/ fun component1(): kotlin.String - public final /*synthesized*/ fun copy(/*0*/ s: kotlin.String = ...): ImplInterface - public abstract override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public abstract override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public abstract override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} - -public final data class Nasty : Base { - public constructor Nasty(/*0*/ z: kotlin.Int, /*1*/ y: kotlin.Int) - public final override /*1*/ /*fake_override*/ val x: kotlin.Int - public final val y: kotlin.Int - public final val z: kotlin.Int - public final override /*1*/ /*synthesized*/ fun component1(): kotlin.Int - public final operator /*synthesized*/ fun component2(): kotlin.Int - public final override /*1*/ /*fake_override*/ fun copy(/*0*/ x: kotlin.Int = ...): Base - public final /*synthesized*/ fun copy(/*0*/ z: kotlin.Int = ..., /*1*/ y: kotlin.Int = ...): Nasty - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} - -public open class NotAllowed { - public constructor NotAllowed() - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} diff --git a/compiler/testData/diagnostics/tests/sourceCompatibility/noInlineProperty.fir.kt b/compiler/testData/diagnostics/tests/sourceCompatibility/noInlineProperty.fir.kt deleted file mode 100644 index 417acde382f..00000000000 --- a/compiler/testData/diagnostics/tests/sourceCompatibility/noInlineProperty.fir.kt +++ /dev/null @@ -1,11 +0,0 @@ -// !LANGUAGE: -InlineProperties -var value: Int = 0 - -inline var z: Int - get() = ++value - set(p: Int) { value = p } - - -var z2: Int - inline get() = ++value - inline set(p: Int) { value = p } diff --git a/compiler/testData/diagnostics/tests/sourceCompatibility/noInlineProperty.kt b/compiler/testData/diagnostics/tests/sourceCompatibility/noInlineProperty.kt deleted file mode 100644 index c32b312825c..00000000000 --- a/compiler/testData/diagnostics/tests/sourceCompatibility/noInlineProperty.kt +++ /dev/null @@ -1,11 +0,0 @@ -// !LANGUAGE: -InlineProperties -var value: Int = 0 - -inline var z: Int - get() = ++value - set(p: Int) { value = p } - - -var z2: Int - inline get() = ++value - inline set(p: Int) { value = p } diff --git a/compiler/testData/diagnostics/tests/sourceCompatibility/noInlineProperty.txt b/compiler/testData/diagnostics/tests/sourceCompatibility/noInlineProperty.txt deleted file mode 100644 index 6c6dd1f87f0..00000000000 --- a/compiler/testData/diagnostics/tests/sourceCompatibility/noInlineProperty.txt +++ /dev/null @@ -1,5 +0,0 @@ -package - -public var value: kotlin.Int -public var z: kotlin.Int -public var z2: kotlin.Int diff --git a/compiler/testData/diagnostics/tests/sourceCompatibility/noLocalDelegatedProperty.fir.kt b/compiler/testData/diagnostics/tests/sourceCompatibility/noLocalDelegatedProperty.fir.kt deleted file mode 100644 index d5703b17233..00000000000 --- a/compiler/testData/diagnostics/tests/sourceCompatibility/noLocalDelegatedProperty.fir.kt +++ /dev/null @@ -1,21 +0,0 @@ -// !LANGUAGE: -LocalDelegatedProperties -import kotlin.reflect.KProperty - -class Delegate { - operator fun getValue(t: Any?, p: KProperty<*>): Int = 1 -} - -fun foo(): Int { - val prop: Int by Delegate() - - val prop2: Int by 123 - - val obj = object { - fun v(): Int { - val prop3: Int by Delegate() - return prop3 - } - } - - return prop + prop2 + obj.v() -} diff --git a/compiler/testData/diagnostics/tests/sourceCompatibility/noLocalDelegatedProperty.kt b/compiler/testData/diagnostics/tests/sourceCompatibility/noLocalDelegatedProperty.kt deleted file mode 100644 index 6b192962382..00000000000 --- a/compiler/testData/diagnostics/tests/sourceCompatibility/noLocalDelegatedProperty.kt +++ /dev/null @@ -1,21 +0,0 @@ -// !LANGUAGE: -LocalDelegatedProperties -import kotlin.reflect.KProperty - -class Delegate { - operator fun getValue(t: Any?, p: KProperty<*>): Int = 1 -} - -fun foo(): Int { - val prop: Int by Delegate() - - val prop2: Int by 123 - - val obj = object { - fun v(): Int { - val prop3: Int by Delegate() - return prop3 - } - } - - return prop + prop2 + obj.v() -} diff --git a/compiler/testData/diagnostics/tests/sourceCompatibility/noLocalDelegatedProperty.txt b/compiler/testData/diagnostics/tests/sourceCompatibility/noLocalDelegatedProperty.txt deleted file mode 100644 index d2ba7ec8e27..00000000000 --- a/compiler/testData/diagnostics/tests/sourceCompatibility/noLocalDelegatedProperty.txt +++ /dev/null @@ -1,11 +0,0 @@ -package - -public fun foo(): kotlin.Int - -public final class Delegate { - public constructor Delegate() - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public final operator fun getValue(/*0*/ t: kotlin.Any?, /*1*/ p: kotlin.reflect.KProperty<*>): kotlin.Int - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} diff --git a/compiler/testData/diagnostics/tests/sourceCompatibility/noLocalDelegatedPropertyInScript.kts b/compiler/testData/diagnostics/tests/sourceCompatibility/noLocalDelegatedPropertyInScript.kts deleted file mode 100644 index 3765da85bee..00000000000 --- a/compiler/testData/diagnostics/tests/sourceCompatibility/noLocalDelegatedPropertyInScript.kts +++ /dev/null @@ -1,23 +0,0 @@ -// !LANGUAGE: -LocalDelegatedProperties - -// FILE: script.kts -import kotlin.reflect.KProperty - -class Delegate { - operator fun getValue(t: Any?, p: KProperty<*>): Int = 1 -} - -fun foo(): Int { - val prop: Int by Delegate() - - val prop2: Int by 123 - - return prop + prop2 -} - - -val prop: Int by Delegate() - -val prop2: Int by 123 - -prop + prop2 \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/sourceCompatibility/noLocalDelegatedPropertyInScript.txt b/compiler/testData/diagnostics/tests/sourceCompatibility/noLocalDelegatedPropertyInScript.txt deleted file mode 100644 index d58077a0542..00000000000 --- a/compiler/testData/diagnostics/tests/sourceCompatibility/noLocalDelegatedPropertyInScript.txt +++ /dev/null @@ -1,20 +0,0 @@ -package - -public final class Script : kotlin.script.templates.standard.ScriptTemplateWithArgs { - public constructor Script(/*0*/ args: kotlin.Array) - public final override /*1*/ /*fake_override*/ val args: kotlin.Array - public final val prop: kotlin.Int - public final val prop2: kotlin.Int - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public final fun foo(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - - public final class Delegate { - public constructor Delegate() - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public final operator fun getValue(/*0*/ t: kotlin.Any?, /*1*/ p: kotlin.reflect.KProperty<*>): kotlin.Int - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - } -} diff --git a/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/overloadResolutionStaticWithoutRefinedSams.fir.kt b/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/overloadResolutionStaticWithoutRefinedSams.fir.kt deleted file mode 100644 index 03ae61e7861..00000000000 --- a/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/overloadResolutionStaticWithoutRefinedSams.fir.kt +++ /dev/null @@ -1,37 +0,0 @@ -// !LANGUAGE: -RefinedSamAdaptersPriority -NewInference -// !CHECK_TYPE -// FILE: A.java -public class A { - public static int foo(Runnable r) { return 0; } - public static String foo(Object r) { return null;} - - public static int bar(Runnable r) { return 1; } - public static String bar(CharSequence r) { return null; } -} - -// FILE: 1.kt -fun fn() {} -fun x(r: Runnable) { - A.foo(::fn) checkType { _() } - A.foo {} checkType { _() } - - A.foo(null) checkType { _() } - A.foo(Runnable { }) checkType { _() } - A.foo(r) checkType { _() } - - A.foo(123) checkType { _() } - A.foo("") checkType { _() } - - A.bar(::fn) checkType { _() } - A.bar {} checkType { _() } - - A.bar(r) checkType { _() } - - A.bar(null) - - A.bar(null as Runnable?) checkType { _() } - A.bar(null as CharSequence?) checkType { _() } - - A.bar("") checkType { _() } - A.bar(123) -} diff --git a/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/overloadResolutionStaticWithoutRefinedSams.kt b/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/overloadResolutionStaticWithoutRefinedSams.kt deleted file mode 100644 index 756e884efa1..00000000000 --- a/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/overloadResolutionStaticWithoutRefinedSams.kt +++ /dev/null @@ -1,37 +0,0 @@ -// !LANGUAGE: -RefinedSamAdaptersPriority -NewInference -// !CHECK_TYPE -// FILE: A.java -public class A { - public static int foo(Runnable r) { return 0; } - public static String foo(Object r) { return null;} - - public static int bar(Runnable r) { return 1; } - public static String bar(CharSequence r) { return null; } -} - -// FILE: 1.kt -fun fn() {} -fun x(r: Runnable) { - A.foo(::fn) checkType { _() } - A.foo {} checkType { _() } - - A.foo(null) checkType { _() } - A.foo(Runnable { }) checkType { _() } - A.foo(r) checkType { _() } - - A.foo(123) checkType { _() } - A.foo("") checkType { _() } - - A.bar(::fn) checkType { _() } - A.bar {} checkType { _() } - - A.bar(r) checkType { _() } - - A.bar(null) - - A.bar(null as Runnable?) checkType { _() } - A.bar(null as CharSequence?) checkType { _() } - - A.bar("") checkType { _() } - A.bar(123) -} diff --git a/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/overloadResolutionStaticWithoutRefinedSams.txt b/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/overloadResolutionStaticWithoutRefinedSams.txt deleted file mode 100644 index a516e5db213..00000000000 --- a/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/overloadResolutionStaticWithoutRefinedSams.txt +++ /dev/null @@ -1,17 +0,0 @@ -package - -public fun fn(): kotlin.Unit -public fun x(/*0*/ r: java.lang.Runnable): kotlin.Unit - -public open class A { - public constructor A() - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - - // Static members - public open fun bar(/*0*/ r: java.lang.Runnable!): kotlin.Int - public open fun bar(/*0*/ r: kotlin.CharSequence!): kotlin.String! - public open fun foo(/*0*/ r: java.lang.Runnable!): kotlin.Int - public open fun foo(/*0*/ r: kotlin.Any!): kotlin.String! -} diff --git a/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/overloadResolutionWithoutRefinedSams.fir.kt b/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/overloadResolutionWithoutRefinedSams.fir.kt deleted file mode 100644 index b54b6089673..00000000000 --- a/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/overloadResolutionWithoutRefinedSams.fir.kt +++ /dev/null @@ -1,37 +0,0 @@ -// !LANGUAGE: -RefinedSamAdaptersPriority -NewInference -// !CHECK_TYPE -// FILE: A.java -public class A { - public int foo(Runnable r) { return 0; } - public String foo(Object r) { return null;} - - public int bar(Runnable r) { return 1; } - public String bar(CharSequence r) { return null; } -} - -// FILE: 1.kt -fun fn() {} -fun x(a: A, r: Runnable) { - a.foo(::fn) checkType { _() } - a.foo {} checkType { _() } - - a.foo(null) checkType { _() } - a.foo(Runnable { }) checkType { _() } - a.foo(r) checkType { _() } - - a.foo(123) checkType { _() } - a.foo("") checkType { _() } - - a.bar(::fn) checkType { _() } - a.bar {} checkType { _() } - - a.bar(r) checkType { _() } - - a.bar(null) - - a.bar(null as Runnable?) checkType { _() } - a.bar(null as CharSequence?) checkType { _() } - - a.bar("") checkType { _() } - a.bar(123) -} diff --git a/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/overloadResolutionWithoutRefinedSams.kt b/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/overloadResolutionWithoutRefinedSams.kt deleted file mode 100644 index 198f1be6f54..00000000000 --- a/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/overloadResolutionWithoutRefinedSams.kt +++ /dev/null @@ -1,37 +0,0 @@ -// !LANGUAGE: -RefinedSamAdaptersPriority -NewInference -// !CHECK_TYPE -// FILE: A.java -public class A { - public int foo(Runnable r) { return 0; } - public String foo(Object r) { return null;} - - public int bar(Runnable r) { return 1; } - public String bar(CharSequence r) { return null; } -} - -// FILE: 1.kt -fun fn() {} -fun x(a: A, r: Runnable) { - a.foo(::fn) checkType { _() } - a.foo {} checkType { _() } - - a.foo(null) checkType { _() } - a.foo(Runnable { }) checkType { _() } - a.foo(r) checkType { _() } - - a.foo(123) checkType { _() } - a.foo("") checkType { _() } - - a.bar(::fn) checkType { _() } - a.bar {} checkType { _() } - - a.bar(r) checkType { _() } - - a.bar(null) - - a.bar(null as Runnable?) checkType { _() } - a.bar(null as CharSequence?) checkType { _() } - - a.bar("") checkType { _() } - a.bar(123) -} diff --git a/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/overloadResolutionWithoutRefinedSams.txt b/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/overloadResolutionWithoutRefinedSams.txt deleted file mode 100644 index c6b3ca874bd..00000000000 --- a/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/overloadResolutionWithoutRefinedSams.txt +++ /dev/null @@ -1,15 +0,0 @@ -package - -public fun fn(): kotlin.Unit -public fun x(/*0*/ a: A, /*1*/ r: java.lang.Runnable): kotlin.Unit - -public open class A { - public constructor A() - public open fun bar(/*0*/ r: java.lang.Runnable!): kotlin.Int - public open fun bar(/*0*/ r: kotlin.CharSequence!): kotlin.String! - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open fun foo(/*0*/ r: java.lang.Runnable!): kotlin.Int - public open fun foo(/*0*/ r: kotlin.Any!): kotlin.String! - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} diff --git a/compiler/testData/diagnostics/tests/typealias/unsupportedTypeAlias.fir.kt b/compiler/testData/diagnostics/tests/typealias/unsupportedTypeAlias.fir.kt deleted file mode 100644 index c5f2135351d..00000000000 --- a/compiler/testData/diagnostics/tests/typealias/unsupportedTypeAlias.fir.kt +++ /dev/null @@ -1,14 +0,0 @@ -// !LANGUAGE: -TypeAliases - -class C - -typealias S = String -typealias L = List -typealias CA = C -typealias Unused = Any - -val test1: S = "" - -fun test2(x: L) = x - -class Test3 : CA() \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/typealias/unsupportedTypeAlias.kt b/compiler/testData/diagnostics/tests/typealias/unsupportedTypeAlias.kt deleted file mode 100644 index 43be33ef29e..00000000000 --- a/compiler/testData/diagnostics/tests/typealias/unsupportedTypeAlias.kt +++ /dev/null @@ -1,14 +0,0 @@ -// !LANGUAGE: -TypeAliases - -class C - -typealias S = String -typealias L = List -typealias CA = C -typealias Unused = Any - -val test1: S = "" - -fun test2(x: L<S>) = x - -class Test3 : CA() \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/typealias/unsupportedTypeAlias.txt b/compiler/testData/diagnostics/tests/typealias/unsupportedTypeAlias.txt deleted file mode 100644 index a2a4d5f8f48..00000000000 --- a/compiler/testData/diagnostics/tests/typealias/unsupportedTypeAlias.txt +++ /dev/null @@ -1,22 +0,0 @@ -package - -public val test1: [ERROR : S] -public fun test2(/*0*/ x: [ERROR : L]<[ERROR : S]>): [ERROR : L]<[ERROR : S]> - -public final class C { - public constructor C() - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} - -public final class Test3 { - public constructor Test3() - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} -public typealias CA = [ERROR : CA] -public typealias L = [ERROR : L] -public typealias S = [ERROR : S] -public typealias Unused = [ERROR : Unused] diff --git a/compiler/testData/diagnostics/tests/underscoresInNumericLiterals/noUnderscores.fir.kt b/compiler/testData/diagnostics/tests/underscoresInNumericLiterals/noUnderscores.fir.kt deleted file mode 100644 index 16e730c26eb..00000000000 --- a/compiler/testData/diagnostics/tests/underscoresInNumericLiterals/noUnderscores.fir.kt +++ /dev/null @@ -1,9 +0,0 @@ -// !LANGUAGE: -UnderscoresInNumericLiterals -// !DIAGNOSTICS: -UNUSED_EXPRESSION - -fun foo() { - 100_1 - 3_.1 - 2___4 - 123_ -} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/underscoresInNumericLiterals/noUnderscores.kt b/compiler/testData/diagnostics/tests/underscoresInNumericLiterals/noUnderscores.kt deleted file mode 100644 index faaf4554302..00000000000 --- a/compiler/testData/diagnostics/tests/underscoresInNumericLiterals/noUnderscores.kt +++ /dev/null @@ -1,9 +0,0 @@ -// !LANGUAGE: -UnderscoresInNumericLiterals -// !DIAGNOSTICS: -UNUSED_EXPRESSION - -fun foo() { - 100_1 - 3_.1 - 2___4 - 123_ -} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/underscoresInNumericLiterals/noUnderscores.txt b/compiler/testData/diagnostics/tests/underscoresInNumericLiterals/noUnderscores.txt deleted file mode 100644 index 65a6ac47e1f..00000000000 --- a/compiler/testData/diagnostics/tests/underscoresInNumericLiterals/noUnderscores.txt +++ /dev/null @@ -1,3 +0,0 @@ -package - -public fun foo(): kotlin.Unit diff --git a/compiler/testData/diagnostics/tests/varargs/noAssigningArraysToVarargsFeature.fir.kt b/compiler/testData/diagnostics/tests/varargs/noAssigningArraysToVarargsFeature.fir.kt deleted file mode 100644 index 9878ff53049..00000000000 --- a/compiler/testData/diagnostics/tests/varargs/noAssigningArraysToVarargsFeature.fir.kt +++ /dev/null @@ -1,48 +0,0 @@ -// !LANGUAGE: +ArrayLiteralsInAnnotations, -AssigningArraysToVarargsInNamedFormInAnnotations -AllowAssigningArrayElementsToVarargsInNamedFormForFunctions - -// FILE: JavaAnn.java - -@interface JavaAnn { - String[] value() default {}; - String[] path() default {}; -} - -// FILE: test.kt - -annotation class Ann(vararg val s: String) - -@Ann(s = arrayOf()) -fun test1() {} - -@Ann(s = intArrayOf()) -fun test2() {} - -@Ann(s = arrayOf(1)) -fun test3() {} - -@Ann(s = ["value"]) -fun test5() {} - -@JavaAnn(value = arrayOf("value")) -fun jTest1() {} - -@JavaAnn(value = ["value"]) -fun jTest2() {} - -@JavaAnn(value = ["value"], path = ["path"]) -fun jTest3() {} - -annotation class IntAnn(vararg val i: Int) - -@IntAnn(i = [1, 2]) -fun foo1() {} - -@IntAnn(i = intArrayOf(0)) -fun foo2() {} - -fun foo(vararg i: Int) {} - -@Ann(s = "value") -fun dep1() { - foo(i = 1) -} diff --git a/compiler/testData/diagnostics/tests/varargs/noAssigningArraysToVarargsFeature.kt b/compiler/testData/diagnostics/tests/varargs/noAssigningArraysToVarargsFeature.kt deleted file mode 100644 index 5946f47e662..00000000000 --- a/compiler/testData/diagnostics/tests/varargs/noAssigningArraysToVarargsFeature.kt +++ /dev/null @@ -1,48 +0,0 @@ -// !LANGUAGE: +ArrayLiteralsInAnnotations, -AssigningArraysToVarargsInNamedFormInAnnotations -AllowAssigningArrayElementsToVarargsInNamedFormForFunctions - -// FILE: JavaAnn.java - -@interface JavaAnn { - String[] value() default {}; - String[] path() default {}; -} - -// FILE: test.kt - -annotation class Ann(vararg val s: String) - -@Ann(s = arrayOf()) -fun test1() {} - -@Ann(s = intArrayOf()) -fun test2() {} - -@Ann(s = arrayOf(1)) -fun test3() {} - -@Ann(s = ["value"]) -fun test5() {} - -@JavaAnn(value = arrayOf("value")) -fun jTest1() {} - -@JavaAnn(value = ["value"]) -fun jTest2() {} - -@JavaAnn(value = ["value"], path = ["path"]) -fun jTest3() {} - -annotation class IntAnn(vararg val i: Int) - -@IntAnn(i = [1, 2]) -fun foo1() {} - -@IntAnn(i = intArrayOf(0)) -fun foo2() {} - -fun foo(vararg i: Int) {} - -@Ann(s = "value") -fun dep1() { - foo(i = 1) -} diff --git a/compiler/testData/diagnostics/tests/varargs/noAssigningArraysToVarargsFeature.txt b/compiler/testData/diagnostics/tests/varargs/noAssigningArraysToVarargsFeature.txt deleted file mode 100644 index 2f22dcdcc7a..00000000000 --- a/compiler/testData/diagnostics/tests/varargs/noAssigningArraysToVarargsFeature.txt +++ /dev/null @@ -1,38 +0,0 @@ -package - -@Ann(s = {"value"}) public fun dep1(): kotlin.Unit -public fun foo(/*0*/ vararg i: kotlin.Int /*kotlin.IntArray*/): kotlin.Unit -@IntAnn(i = {1, 2}) public fun foo1(): kotlin.Unit -@IntAnn(i = {0}) public fun foo2(): kotlin.Unit -@JavaAnn(value = {"value"}) public fun jTest1(): kotlin.Unit -@JavaAnn(value = {"value"}) public fun jTest2(): kotlin.Unit -@JavaAnn(path = {"path"}, value = {"value"}) public fun jTest3(): kotlin.Unit -@Ann(s = {}) public fun test1(): kotlin.Unit -@Ann(s = {}) public fun test2(): kotlin.Unit -@Ann(s = {1}) public fun test3(): kotlin.Unit -@Ann(s = {"value"}) public fun test5(): kotlin.Unit - -public final annotation class Ann : kotlin.Annotation { - public constructor Ann(/*0*/ vararg s: kotlin.String /*kotlin.Array*/) - public final val s: kotlin.Array - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} - -public final annotation class IntAnn : kotlin.Annotation { - public constructor IntAnn(/*0*/ vararg i: kotlin.Int /*kotlin.IntArray*/) - public final val i: kotlin.IntArray - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} - -public/*package*/ final annotation class JavaAnn : kotlin.Annotation { - public/*package*/ constructor JavaAnn(/*0*/ vararg value: kotlin.String /*kotlin.Array*/ = ..., /*1*/ path: kotlin.Array = ...) - public final val path: kotlin.Array - public final val value: kotlin.Array - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} diff --git a/compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithGenericsWithoutRefinedSams.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithGenericsWithoutRefinedSams.fir.kt deleted file mode 100644 index 65c1a424cfd..00000000000 --- a/compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithGenericsWithoutRefinedSams.fir.kt +++ /dev/null @@ -1,25 +0,0 @@ -// !LANGUAGE: -RefinedSamAdaptersPriority -NewInference -// !DIAGNOSTICS: -UNUSED_PARAMETER -// !CHECK_TYPE - -// FILE: Foo.java -import kotlin.Unit; -import kotlin.jvm.functions.Function1; - -class Foo { - interface FObject { - void invoke(T i); - } - - public String foo(FObject f) { return ""; } - public int foo(Function1 f) { return 1; } - - public String bar(FObject f) { return ""; } - public int bar(Function1 f) { return 1; } -} - -// FILE: 1.kt -fun test() { - Foo().foo {} checkType { _() } - Foo().bar {} checkType { _() } -} diff --git a/compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithGenericsWithoutRefinedSams.kt b/compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithGenericsWithoutRefinedSams.kt deleted file mode 100644 index 2615131f591..00000000000 --- a/compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithGenericsWithoutRefinedSams.kt +++ /dev/null @@ -1,25 +0,0 @@ -// !LANGUAGE: -RefinedSamAdaptersPriority -NewInference -// !DIAGNOSTICS: -UNUSED_PARAMETER -// !CHECK_TYPE - -// FILE: Foo.java -import kotlin.Unit; -import kotlin.jvm.functions.Function1; - -class Foo { - interface FObject { - void invoke(T i); - } - - public String foo(FObject f) { return ""; } - public int foo(Function1 f) { return 1; } - - public String bar(FObject f) { return ""; } - public int bar(Function1 f) { return 1; } -} - -// FILE: 1.kt -fun test() { - Foo().foo {} checkType { _() } - Foo().bar {} checkType { _() } -} diff --git a/compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithGenericsWithoutRefinedSams.txt b/compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithGenericsWithoutRefinedSams.txt deleted file mode 100644 index dd7bce600c5..00000000000 --- a/compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithGenericsWithoutRefinedSams.txt +++ /dev/null @@ -1,21 +0,0 @@ -package - -public fun test(): kotlin.Unit - -public/*package*/ open class Foo { - public/*package*/ constructor Foo() - public open fun bar(/*0*/ f: ((kotlin.Int!) -> kotlin.Unit!)!): kotlin.Int - public open fun bar(/*0*/ f: Foo.FObject!): kotlin.String! - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open fun foo(/*0*/ f: ((kotlin.Int!) -> kotlin.Unit!)!): kotlin.Int - public open fun foo(/*0*/ f: Foo.FObject!): kotlin.String! - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - - public/*package*/ interface FObject { - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public abstract operator fun invoke(/*0*/ i: T!): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - } -} diff --git a/compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithKtFunctionWithoutRefinedSams.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithKtFunctionWithoutRefinedSams.fir.kt deleted file mode 100644 index 02bc6ca3fc8..00000000000 --- a/compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithKtFunctionWithoutRefinedSams.fir.kt +++ /dev/null @@ -1,21 +0,0 @@ -// !LANGUAGE: -RefinedSamAdaptersPriority -NewInference -// !DIAGNOSTICS: -UNUSED_PARAMETER -// !CHECK_TYPE - -// FILE: Foo.java -import kotlin.Unit; -import kotlin.jvm.functions.Function1; - -public class Foo { - interface FObject { - void invoke(Object i); - } - - public String test(FObject f) { return ""; } - public int test(Function1 f) { return 1; } -} - -// FILE: 1.kt -fun bar() { - Foo().test {} checkType { _() } -} diff --git a/compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithKtFunctionWithoutRefinedSams.kt b/compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithKtFunctionWithoutRefinedSams.kt deleted file mode 100644 index a5c6a91657d..00000000000 --- a/compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithKtFunctionWithoutRefinedSams.kt +++ /dev/null @@ -1,21 +0,0 @@ -// !LANGUAGE: -RefinedSamAdaptersPriority -NewInference -// !DIAGNOSTICS: -UNUSED_PARAMETER -// !CHECK_TYPE - -// FILE: Foo.java -import kotlin.Unit; -import kotlin.jvm.functions.Function1; - -public class Foo { - interface FObject { - void invoke(Object i); - } - - public String test(FObject f) { return ""; } - public int test(Function1 f) { return 1; } -} - -// FILE: 1.kt -fun bar() { - Foo().test {} checkType { _() } -} diff --git a/compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithKtFunctionWithoutRefinedSams.txt b/compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithKtFunctionWithoutRefinedSams.txt deleted file mode 100644 index 91c9531c13d..00000000000 --- a/compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithKtFunctionWithoutRefinedSams.txt +++ /dev/null @@ -1,19 +0,0 @@ -package - -public fun bar(): kotlin.Unit - -public open class Foo { - public constructor Foo() - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open fun test(/*0*/ f: ((kotlin.Int!) -> kotlin.Unit!)!): kotlin.Int - public open fun test(/*0*/ f: Foo.FObject!): kotlin.String! - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - - public/*package*/ interface FObject { - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public abstract operator fun invoke(/*0*/ i: kotlin.Any!): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - } -} diff --git a/compiler/testData/diagnostics/testsWithStdLib/sourceCompatibility/noDefaultImportOfKotlinComparisons.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/sourceCompatibility/noDefaultImportOfKotlinComparisons.fir.kt deleted file mode 100644 index 17bb9e1fbab..00000000000 --- a/compiler/testData/diagnostics/testsWithStdLib/sourceCompatibility/noDefaultImportOfKotlinComparisons.fir.kt +++ /dev/null @@ -1,3 +0,0 @@ -// !LANGUAGE: -DefaultImportOfPackageKotlinComparisons - -fun foo() = compareBy { it.length } diff --git a/compiler/testData/diagnostics/testsWithStdLib/sourceCompatibility/noDefaultImportOfKotlinComparisons.kt b/compiler/testData/diagnostics/testsWithStdLib/sourceCompatibility/noDefaultImportOfKotlinComparisons.kt deleted file mode 100644 index 3f38d5a2327..00000000000 --- a/compiler/testData/diagnostics/testsWithStdLib/sourceCompatibility/noDefaultImportOfKotlinComparisons.kt +++ /dev/null @@ -1,3 +0,0 @@ -// !LANGUAGE: -DefaultImportOfPackageKotlinComparisons - -fun foo() = compareBy { it.length } diff --git a/compiler/testData/diagnostics/testsWithStdLib/sourceCompatibility/noDefaultImportOfKotlinComparisons.txt b/compiler/testData/diagnostics/testsWithStdLib/sourceCompatibility/noDefaultImportOfKotlinComparisons.txt deleted file mode 100644 index 380dce8c9f4..00000000000 --- a/compiler/testData/diagnostics/testsWithStdLib/sourceCompatibility/noDefaultImportOfKotlinComparisons.txt +++ /dev/null @@ -1,3 +0,0 @@ -package - -public fun foo(): [ERROR : Error function type] diff --git a/compiler/testData/diagnostics/testsWithStdLib/targetedBuiltIns/unsupportedFeature.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/targetedBuiltIns/unsupportedFeature.fir.kt deleted file mode 100644 index ac09552fc76..00000000000 --- a/compiler/testData/diagnostics/testsWithStdLib/targetedBuiltIns/unsupportedFeature.fir.kt +++ /dev/null @@ -1,65 +0,0 @@ -// !CHECK_TYPE -// !LANGUAGE: -AdditionalBuiltInsMembers -// SKIP_TXT -// FULL_JDK - -class A : java.util.ArrayList() { - // `stream` is defined in ArrayList, so it was impossible to override it in 1.0 - override fun stream(): java.util.stream.Stream = super.stream() - - // `sort` is defined in ArrayList, so it was possible to override it in 1.0 - override fun sort(c: Comparator?) { - super.sort(c) - } -} - -class A1 : java.util.ArrayList() { - // `stream` is defined in Collection, so it was possible to declare it in 1.0 without an 'override' keyword - fun stream(): java.util.stream.Stream = super.stream() - - // `sort` is defined in ArrayList, so it was impossible to declare it in 1.0 without an 'override' keyword - fun sort(c: Comparator?) { - super.sort(c) - } -} - -interface A2 : List { - override fun stream(): java.util.stream.Stream = null!! -} - -class B : Throwable("", null, false, false) - -class B1 : RuntimeException() { - override fun fillInStackTrace(): Throwable { // 'override' keyword must be prohibited, as it was in 1.0.x - return this - } -} - -class A3(val x: List) : List by x - -fun Throwable.fillInStackTrace() = 1 - -fun foo(x: List, y: Throwable, z: A3) { - x.stream() - java.util.ArrayList().stream() - - y.fillInStackTrace() checkType { _() } - - HashMap().getOrDefault(Any(), null) - - // Falls back to extension in stdlib - y.printStackTrace() - - z.stream() -} - -interface X { - fun foo(): Int = 1 - val hidden: Boolean -} - -class Y : X { - // There should not be UNSUPPORTED_FEATURE diagnostic - override fun foo() = 1 - override var hidden: Boolean = true -} diff --git a/compiler/testData/diagnostics/testsWithStdLib/targetedBuiltIns/unsupportedFeature.kt b/compiler/testData/diagnostics/testsWithStdLib/targetedBuiltIns/unsupportedFeature.kt deleted file mode 100644 index 846d472474f..00000000000 --- a/compiler/testData/diagnostics/testsWithStdLib/targetedBuiltIns/unsupportedFeature.kt +++ /dev/null @@ -1,65 +0,0 @@ -// !CHECK_TYPE -// !LANGUAGE: -AdditionalBuiltInsMembers -// SKIP_TXT -// FULL_JDK - -class A : java.util.ArrayList() { - // `stream` is defined in ArrayList, so it was impossible to override it in 1.0 - override fun stream(): java.util.stream.Stream = super.stream() - - // `sort` is defined in ArrayList, so it was possible to override it in 1.0 - override fun sort(c: Comparator?) { - super.sort(c) - } -} - -class A1 : java.util.ArrayList() { - // `stream` is defined in Collection, so it was possible to declare it in 1.0 without an 'override' keyword - fun stream(): java.util.stream.Stream = super.stream() - - // `sort` is defined in ArrayList, so it was impossible to declare it in 1.0 without an 'override' keyword - fun sort(c: Comparator?) { - super.sort(c) - } -} - -interface A2 : List { - override fun stream(): java.util.stream.Stream = null!! -} - -class B : Throwable("", null, false, false) - -class B1 : RuntimeException() { - override fun fillInStackTrace(): Throwable { // 'override' keyword must be prohibited, as it was in 1.0.x - return this - } -} - -class A3(val x: List) : List by x - -fun Throwable.fillInStackTrace() = 1 - -fun foo(x: List, y: Throwable, z: A3) { - x.stream() - java.util.ArrayList().stream() - - y.fillInStackTrace() checkType { _() } - - HashMap().getOrDefault(Any(), null) - - // Falls back to extension in stdlib - y.printStackTrace() - - z.stream() -} - -interface X { - fun foo(): Int = 1 - val hidden: Boolean -} - -class Y : X { - // There should not be UNSUPPORTED_FEATURE diagnostic - override fun foo() = 1 - override var hidden: Boolean = true -} diff --git a/compiler/testData/diagnostics/testsWithStdLib/typealias/exceptionTypeAliasesInvisibleWithoutFeature.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/typealias/exceptionTypeAliasesInvisibleWithoutFeature.fir.kt deleted file mode 100644 index 9df3938bc68..00000000000 --- a/compiler/testData/diagnostics/testsWithStdLib/typealias/exceptionTypeAliasesInvisibleWithoutFeature.fir.kt +++ /dev/null @@ -1,4 +0,0 @@ -// !LANGUAGE: -TypeAliases -// FILE: test.kt -val fooException = Exception("foo") -val barException = kotlin.Exception("bar") diff --git a/compiler/testData/diagnostics/testsWithStdLib/typealias/exceptionTypeAliasesInvisibleWithoutFeature.kt b/compiler/testData/diagnostics/testsWithStdLib/typealias/exceptionTypeAliasesInvisibleWithoutFeature.kt deleted file mode 100644 index 66b41670c8e..00000000000 --- a/compiler/testData/diagnostics/testsWithStdLib/typealias/exceptionTypeAliasesInvisibleWithoutFeature.kt +++ /dev/null @@ -1,4 +0,0 @@ -// !LANGUAGE: -TypeAliases -// FILE: test.kt -val fooException = Exception("foo") -val barException = kotlin.Exception("bar") diff --git a/compiler/testData/diagnostics/testsWithStdLib/typealias/exceptionTypeAliasesInvisibleWithoutFeature.txt b/compiler/testData/diagnostics/testsWithStdLib/typealias/exceptionTypeAliasesInvisibleWithoutFeature.txt deleted file mode 100644 index 2f65e9970c7..00000000000 --- a/compiler/testData/diagnostics/testsWithStdLib/typealias/exceptionTypeAliasesInvisibleWithoutFeature.txt +++ /dev/null @@ -1,4 +0,0 @@ -package - -public val barException: [ERROR : Type for kotlin.Exception("bar")] -public val fooException: java.lang.Exception diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java index 6b63cd934c7..387f5d0b544 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java @@ -746,12 +746,6 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { runTest("compiler/testData/diagnostics/tests/ShiftFunctionTypes.kt"); } - @Test - @TestMetadata("SingleUnderscoreUnsupported.kt") - public void testSingleUnderscoreUnsupported() throws Exception { - runTest("compiler/testData/diagnostics/tests/SingleUnderscoreUnsupported.kt"); - } - @Test @TestMetadata("StarsInFunctionCalls.kt") public void testStarsInFunctionCalls() throws Exception { @@ -944,12 +938,6 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { runTest("compiler/testData/diagnostics/tests/UnusedParameters.kt"); } - @Test - @TestMetadata("UnusedParametersVersion10.kt") - public void testUnusedParametersVersion10() throws Exception { - runTest("compiler/testData/diagnostics/tests/UnusedParametersVersion10.kt"); - } - @Test @TestMetadata("UnusedVariables.kt") public void testUnusedVariables() throws Exception { @@ -3442,12 +3430,6 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { runTest("compiler/testData/diagnostics/tests/callableReference/generic/nestedCallWithOverload.kt"); } - @Test - @TestMetadata("noInferenceFeatureForCallableReferences.kt") - public void testNoInferenceFeatureForCallableReferences() throws Exception { - runTest("compiler/testData/diagnostics/tests/callableReference/generic/noInferenceFeatureForCallableReferences.kt"); - } - @Test @TestMetadata("resolutionGenericCallableWithNullableTypes.kt") public void testResolutionGenericCallableWithNullableTypes() throws Exception { @@ -4899,12 +4881,6 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { runTest("compiler/testData/diagnostics/tests/collectionLiterals/defaultValuesWithConstantsInAnnotation.kt"); } - @Test - @TestMetadata("noArrayLiteralsInAnnotationsFeature.kt") - public void testNoArrayLiteralsInAnnotationsFeature() throws Exception { - runTest("compiler/testData/diagnostics/tests/collectionLiterals/noArrayLiteralsInAnnotationsFeature.kt"); - } - @Test @TestMetadata("noCollectionLiterals.kt") public void testNoCollectionLiterals() throws Exception { @@ -5853,12 +5829,6 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/unresolvedReference.kt"); } - @Test - @TestMetadata("unusedInAnonymous.kt") - public void testUnusedInAnonymous() throws Exception { - runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/unusedInAnonymous.kt"); - } - @Test @TestMetadata("useUninitializedInLambda.kt") public void testUseUninitializedInLambda() throws Exception { @@ -8397,12 +8367,6 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { public void testSimpleProvideDelegate() throws Exception { runTest("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/simpleProvideDelegate.kt"); } - - @Test - @TestMetadata("unsupportedOperatorProvideDelegate.kt") - public void testUnsupportedOperatorProvideDelegate() throws Exception { - runTest("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/unsupportedOperatorProvideDelegate.kt"); - } } } @@ -11416,12 +11380,6 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { runTest("compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/underscore.kt"); } - @Test - @TestMetadata("unsupportedFeature.kt") - public void testUnsupportedFeature() throws Exception { - runTest("compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/unsupportedFeature.kt"); - } - @Test @TestMetadata("unusedParameters.kt") public void testUnusedParameters() throws Exception { @@ -16275,12 +16233,6 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { runTest("compiler/testData/diagnostics/tests/inline/default.kt"); } - @Test - @TestMetadata("defaultLambdaInlineDisable.kt") - public void testDefaultLambdaInlineDisable() throws Exception { - runTest("compiler/testData/diagnostics/tests/inline/defaultLambdaInlineDisable.kt"); - } - @Test @TestMetadata("defaultLambdaInlineSuspend.kt") public void testDefaultLambdaInlineSuspend() throws Exception { @@ -16317,12 +16269,6 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { runTest("compiler/testData/diagnostics/tests/inline/inlineLambdaInDefaultInlineParameter.kt"); } - @Test - @TestMetadata("inlineLambdaInDefaultInlineParameterDisabled.kt") - public void testInlineLambdaInDefaultInlineParameterDisabled() throws Exception { - runTest("compiler/testData/diagnostics/tests/inline/inlineLambdaInDefaultInlineParameterDisabled.kt"); - } - @Test @TestMetadata("inlineReified.kt") public void testInlineReified() throws Exception { @@ -16527,12 +16473,6 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { runTest("compiler/testData/diagnostics/tests/inline/superProperty.kt"); } - @Test - @TestMetadata("unsupportedConstruction.kt") - public void testUnsupportedConstruction() throws Exception { - runTest("compiler/testData/diagnostics/tests/inline/unsupportedConstruction.kt"); - } - @Test @TestMetadata("vararg.kt") public void testVararg() throws Exception { @@ -17111,12 +17051,6 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { runTest("compiler/testData/diagnostics/tests/inner/extensionLambdaInsideNestedClass.kt"); } - @Test - @TestMetadata("illegalModifier.kt") - public void testIllegalModifier() throws Exception { - runTest("compiler/testData/diagnostics/tests/inner/illegalModifier.kt"); - } - @Test @TestMetadata("illegalModifier_lv12.kt") public void testIllegalModifier_lv12() throws Exception { @@ -17129,12 +17063,6 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { runTest("compiler/testData/diagnostics/tests/inner/innerClassInEnumEntryClassMemberResolve.kt"); } - @Test - @TestMetadata("innerClassInEnumEntryClass_lv11.kt") - public void testInnerClassInEnumEntryClass_lv11() throws Exception { - runTest("compiler/testData/diagnostics/tests/inner/innerClassInEnumEntryClass_lv11.kt"); - } - @Test @TestMetadata("innerClassInEnumEntryClass_lv12.kt") public void testInnerClassInEnumEntryClass_lv12() throws Exception { @@ -17479,12 +17407,6 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { runTest("compiler/testData/diagnostics/tests/j+k/defaultMethodsIndirectInheritance.kt"); } - @Test - @TestMetadata("defaultMethods_warning.kt") - public void testDefaultMethods_warning() throws Exception { - runTest("compiler/testData/diagnostics/tests/j+k/defaultMethods_warning.kt"); - } - @Test @TestMetadata("differentFilename.kt") public void testDifferentFilename() throws Exception { @@ -19179,12 +19101,6 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/lateinit"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } - @Test - @TestMetadata("modifierApplicability.kt") - public void testModifierApplicability() throws Exception { - runTest("compiler/testData/diagnostics/tests/lateinit/modifierApplicability.kt"); - } - @Test @TestMetadata("modifierApplicability_lv12.kt") public void testModifierApplicability_lv12() throws Exception { @@ -19426,12 +19342,6 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { runTest("compiler/testData/diagnostics/tests/modifiers/const/kt15913.kt"); } - @Test - @TestMetadata("noDivisionByZeroFeature.kt") - public void testNoDivisionByZeroFeature() throws Exception { - runTest("compiler/testData/diagnostics/tests/modifiers/const/noDivisionByZeroFeature.kt"); - } - @Test @TestMetadata("types.kt") public void testTypes() throws Exception { @@ -21367,18 +21277,6 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { runTest("compiler/testData/diagnostics/tests/operatorRem/modWithRemAssign.kt"); } - @Test - @TestMetadata("noDeprecatedModConventionWithoutFeature.kt") - public void testNoDeprecatedModConventionWithoutFeature() throws Exception { - runTest("compiler/testData/diagnostics/tests/operatorRem/noDeprecatedModConventionWithoutFeature.kt"); - } - - @Test - @TestMetadata("noOperatorRemFeature.kt") - public void testNoOperatorRemFeature() throws Exception { - runTest("compiler/testData/diagnostics/tests/operatorRem/noOperatorRemFeature.kt"); - } - @Test @TestMetadata("numberRemConversions.kt") public void testNumberRemConversions() throws Exception { @@ -21450,12 +21348,6 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { public void testResolveModIfRemIsHidden() throws Exception { runTest("compiler/testData/diagnostics/tests/operatorRem/resolveModIfRemIsHidden.kt"); } - - @Test - @TestMetadata("resolveToModWhenNoOperatorRemFeature.kt") - public void testResolveToModWhenNoOperatorRemFeature() throws Exception { - runTest("compiler/testData/diagnostics/tests/operatorRem/resolveToModWhenNoOperatorRemFeature.kt"); - } } @Nested @@ -23302,12 +23194,6 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { runTest("compiler/testData/diagnostics/tests/properties/inferenceFromGetters/topLevel.kt"); } - @Test - @TestMetadata("unsupportedInferenceFromGetters.kt") - public void testUnsupportedInferenceFromGetters() throws Exception { - runTest("compiler/testData/diagnostics/tests/properties/inferenceFromGetters/unsupportedInferenceFromGetters.kt"); - } - @Test @TestMetadata("vars.kt") public void testVars() throws Exception { @@ -25168,12 +25054,6 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { runTest("compiler/testData/diagnostics/tests/resolve/dslMarker/typeAliasToBuiltinFunctionType.kt"); } - @Test - @TestMetadata("unsupportedFeature.kt") - public void testUnsupportedFeature() throws Exception { - runTest("compiler/testData/diagnostics/tests/resolve/dslMarker/unsupportedFeature.kt"); - } - @Test @TestMetadata("useOfExtensions.kt") public void testUseOfExtensions() throws Exception { @@ -28035,12 +27915,6 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { runTest("compiler/testData/diagnostics/tests/smartCasts/lambdaUsesOwnerModifies.kt"); } - @Test - @TestMetadata("level_1_0.kt") - public void testLevel_1_0() throws Exception { - runTest("compiler/testData/diagnostics/tests/smartCasts/level_1_0.kt"); - } - @Test @TestMetadata("localClassChanges.kt") public void testLocalClassChanges() throws Exception { @@ -28338,12 +28212,6 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/smartCasts/castchecks"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } - @Test - @TestMetadata("basicOff.kt") - public void testBasicOff() throws Exception { - runTest("compiler/testData/diagnostics/tests/smartCasts/castchecks/basicOff.kt"); - } - @Test @TestMetadata("basicOn.kt") public void testBasicOn() throws Exception { @@ -29266,12 +29134,6 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/receiverAndChainFalse.kt"); } - @Test - @TestMetadata("safeAccessReceiverNotNull.kt") - public void testSafeAccessReceiverNotNull() throws Exception { - runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/safeAccessReceiverNotNull.kt"); - } - @Test @TestMetadata("safeCallIsAlwaysNullable.kt") public void testSafeCallIsAlwaysNullable() throws Exception { @@ -29514,12 +29376,6 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/capturedInClosureModifiedBefore.kt"); } - @Test - @TestMetadata("capturedInClosureOff.kt") - public void testCapturedInClosureOff() throws Exception { - runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/capturedInClosureOff.kt"); - } - @Test @TestMetadata("doWhileWithBreak.kt") public void testDoWhileWithBreak() throws Exception { @@ -29688,12 +29544,6 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/setNullInTryFinally.kt"); } - @Test - @TestMetadata("setNullInTryUnsound.kt") - public void testSetNullInTryUnsound() throws Exception { - runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/setNullInTryUnsound.kt"); - } - @Test @TestMetadata("setSameInTry.kt") public void testSetSameInTry() throws Exception { @@ -29807,48 +29657,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/sourceCompatibility"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } - @Test - @TestMetadata("inlineFunctionAlways.kt") - public void testInlineFunctionAlways() throws Exception { - runTest("compiler/testData/diagnostics/tests/sourceCompatibility/inlineFunctionAlways.kt"); - } - @Test @TestMetadata("noBigFunctionTypes.kt") public void testNoBigFunctionTypes() throws Exception { runTest("compiler/testData/diagnostics/tests/sourceCompatibility/noBigFunctionTypes.kt"); } - @Test - @TestMetadata("noCallableReferencesWithEmptyLHS.kt") - public void testNoCallableReferencesWithEmptyLHS() throws Exception { - runTest("compiler/testData/diagnostics/tests/sourceCompatibility/noCallableReferencesWithEmptyLHS.kt"); - } - - @Test - @TestMetadata("noDataClassInheritance.kt") - public void testNoDataClassInheritance() throws Exception { - runTest("compiler/testData/diagnostics/tests/sourceCompatibility/noDataClassInheritance.kt"); - } - - @Test - @TestMetadata("noInlineProperty.kt") - public void testNoInlineProperty() throws Exception { - runTest("compiler/testData/diagnostics/tests/sourceCompatibility/noInlineProperty.kt"); - } - - @Test - @TestMetadata("noLocalDelegatedProperty.kt") - public void testNoLocalDelegatedProperty() throws Exception { - runTest("compiler/testData/diagnostics/tests/sourceCompatibility/noLocalDelegatedProperty.kt"); - } - - @Test - @TestMetadata("noLocalDelegatedPropertyInScript.kts") - public void testNoLocalDelegatedPropertyInScript() throws Exception { - runTest("compiler/testData/diagnostics/tests/sourceCompatibility/noLocalDelegatedPropertyInScript.kts"); - } - @Test @TestMetadata("noMultiplatformProjects.kt") public void testNoMultiplatformProjects() throws Exception { @@ -29930,40 +29744,6 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { runTest("compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion/typealiasesOnImport.kt"); } } - - @Nested - @TestMetadata("compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences") - @TestDataPath("$PROJECT_ROOT") - public class NoBoundCallableReferences { - @Test - public void testAllFilesPresentInNoBoundCallableReferences() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); - } - - @Test - @TestMetadata("boundCallableReference.kt") - public void testBoundCallableReference() throws Exception { - runTest("compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/boundCallableReference.kt"); - } - - @Test - @TestMetadata("boundClassLiteral.kt") - public void testBoundClassLiteral() throws Exception { - runTest("compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/boundClassLiteral.kt"); - } - - @Test - @TestMetadata("qualifiedJavaClassLiteralInKClassExtension.kt") - public void testQualifiedJavaClassLiteralInKClassExtension() throws Exception { - runTest("compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/qualifiedJavaClassLiteralInKClassExtension.kt"); - } - - @Test - @TestMetadata("qualifiedJavaClassReferenceInKClassExtension.kt") - public void testQualifiedJavaClassReferenceInKClassExtension() throws Exception { - runTest("compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/qualifiedJavaClassReferenceInKClassExtension.kt"); - } - } } @Nested @@ -30712,18 +30492,6 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { runTest("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/overloadResolutionStatic.kt"); } - @Test - @TestMetadata("overloadResolutionStaticWithoutRefinedSams.kt") - public void testOverloadResolutionStaticWithoutRefinedSams() throws Exception { - runTest("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/overloadResolutionStaticWithoutRefinedSams.kt"); - } - - @Test - @TestMetadata("overloadResolutionWithoutRefinedSams.kt") - public void testOverloadResolutionWithoutRefinedSams() throws Exception { - runTest("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/overloadResolutionWithoutRefinedSams.kt"); - } - @Test @TestMetadata("PackageLocal.kt") public void testPackageLocal() throws Exception { @@ -32015,12 +31783,6 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { runTest("compiler/testData/diagnostics/tests/typealias/typealiasRhsRepeatedAnnotations.kt"); } - @Test - @TestMetadata("unsupportedTypeAlias.kt") - public void testUnsupportedTypeAlias() throws Exception { - runTest("compiler/testData/diagnostics/tests/typealias/unsupportedTypeAlias.kt"); - } - @Test @TestMetadata("unusedTypeAliasParameter.kt") public void testUnusedTypeAliasParameter() throws Exception { @@ -32048,12 +31810,6 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { public void testIllegalUnderscores() throws Exception { runTest("compiler/testData/diagnostics/tests/underscoresInNumericLiterals/illegalUnderscores.kt"); } - - @Test - @TestMetadata("noUnderscores.kt") - public void testNoUnderscores() throws Exception { - runTest("compiler/testData/diagnostics/tests/underscoresInNumericLiterals/noUnderscores.kt"); - } } @Nested @@ -32553,12 +32309,6 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { runTest("compiler/testData/diagnostics/tests/varargs/NilaryVsVararg.kt"); } - @Test - @TestMetadata("noAssigningArraysToVarargsFeature.kt") - public void testNoAssigningArraysToVarargsFeature() throws Exception { - runTest("compiler/testData/diagnostics/tests/varargs/noAssigningArraysToVarargsFeature.kt"); - } - @Test @TestMetadata("NullableTypeForVarargArgument.kt") public void testNullableTypeForVarargArgument() throws Exception { @@ -37769,24 +37519,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { runTest("compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithGenerics.kt"); } - @Test - @TestMetadata("samOverloadsWithGenericsWithoutRefinedSams.kt") - public void testSamOverloadsWithGenericsWithoutRefinedSams() throws Exception { - runTest("compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithGenericsWithoutRefinedSams.kt"); - } - @Test @TestMetadata("samOverloadsWithKtFunction.kt") public void testSamOverloadsWithKtFunction() throws Exception { runTest("compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithKtFunction.kt"); } - @Test - @TestMetadata("samOverloadsWithKtFunctionWithoutRefinedSams.kt") - public void testSamOverloadsWithKtFunctionWithoutRefinedSams() throws Exception { - runTest("compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithKtFunctionWithoutRefinedSams.kt"); - } - @Test @TestMetadata("sameNameClassesFromSupertypes.kt") public void testSameNameClassesFromSupertypes() throws Exception { @@ -37888,22 +37626,6 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { } } - @Nested - @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/sourceCompatibility") - @TestDataPath("$PROJECT_ROOT") - public class SourceCompatibility { - @Test - public void testAllFilesPresentInSourceCompatibility() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/sourceCompatibility"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); - } - - @Test - @TestMetadata("noDefaultImportOfKotlinComparisons.kt") - public void testNoDefaultImportOfKotlinComparisons() throws Exception { - runTest("compiler/testData/diagnostics/testsWithStdLib/sourceCompatibility/noDefaultImportOfKotlinComparisons.kt"); - } - } - @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/targetedBuiltIns") @TestDataPath("$PROJECT_ROOT") @@ -37918,12 +37640,6 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { public void testBlackListed() throws Exception { runTest("compiler/testData/diagnostics/testsWithStdLib/targetedBuiltIns/blackListed.kt"); } - - @Test - @TestMetadata("unsupportedFeature.kt") - public void testUnsupportedFeature() throws Exception { - runTest("compiler/testData/diagnostics/testsWithStdLib/targetedBuiltIns/unsupportedFeature.kt"); - } } @Nested @@ -38105,12 +37821,6 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { runTest("compiler/testData/diagnostics/testsWithStdLib/typealias/exceptionTypeAliasesInvisibleWithApiVersion1_0.kt"); } - @Test - @TestMetadata("exceptionTypeAliasesInvisibleWithoutFeature.kt") - public void testExceptionTypeAliasesInvisibleWithoutFeature() throws Exception { - runTest("compiler/testData/diagnostics/testsWithStdLib/typealias/exceptionTypeAliasesInvisibleWithoutFeature.kt"); - } - @Test @TestMetadata("hashMapTypeAlias.kt") public void testHashMapTypeAlias() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java index 9a7664f9f58..4cfd142c8b4 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java @@ -7877,12 +7877,6 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/constants/kt9532.kt"); } - @Test - @TestMetadata("kt9532_lv10.kt") - public void testKt9532_lv10() throws Exception { - runTest("compiler/testData/codegen/box/constants/kt9532_lv10.kt"); - } - @Test @TestMetadata("long.kt") public void testLong() throws Exception { @@ -14655,12 +14649,6 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/delegation/simple.kt"); } - @Test - @TestMetadata("simple1.0.kt") - public void testSimple1_0() throws Exception { - runTest("compiler/testData/codegen/box/delegation/simple1.0.kt"); - } - @Test @TestMetadata("viaTypeAlias.kt") public void testViaTypeAlias() throws Exception { @@ -24629,12 +24617,6 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/jdk/stream.kt"); } - @Test - @TestMetadata("streamBackwardCompatibility.kt") - public void testStreamBackwardCompatibility() throws Exception { - runTest("compiler/testData/codegen/box/jdk/streamBackwardCompatibility.kt"); - } - @Test @TestMetadata("useStream.kt") public void testUseStream() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BytecodeTextTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BytecodeTextTestGenerated.java index 848552e88c1..fe80ec3f5eb 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BytecodeTextTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BytecodeTextTestGenerated.java @@ -1426,18 +1426,6 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { runTest("compiler/testData/codegen/bytecodeText/constProperty/noAccessorsForPrivateConstants.kt"); } - @Test - @TestMetadata("noInline.kt") - public void testNoInline() throws Exception { - runTest("compiler/testData/codegen/bytecodeText/constProperty/noInline.kt"); - } - - @Test - @TestMetadata("noInlineInCmp.kt") - public void testNoInlineInCmp() throws Exception { - runTest("compiler/testData/codegen/bytecodeText/constProperty/noInlineInCmp.kt"); - } - @Test @TestMetadata("nonConstValHasNoDefaultValue_after.kt") public void testNonConstValHasNoDefaultValue_after() throws Exception { @@ -1536,12 +1524,6 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { runTest("compiler/testData/codegen/bytecodeText/constants/noInlineNonStaticJavaField.kt"); } - @Test - @TestMetadata("noInlineNonStaticJavaField_lv10.kt") - public void testNoInlineNonStaticJavaField_lv10() throws Exception { - runTest("compiler/testData/codegen/bytecodeText/constants/noInlineNonStaticJavaField_lv10.kt"); - } - @Test @TestMetadata("nullableByteAndShort.kt") public void testNullableByteAndShort() throws Exception { @@ -4164,12 +4146,6 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { runTest("compiler/testData/codegen/bytecodeText/lazyCodegen/negateConst.kt"); } - @Test - @TestMetadata("negateConstantCompare.kt") - public void testNegateConstantCompare() throws Exception { - runTest("compiler/testData/codegen/bytecodeText/lazyCodegen/negateConstantCompare.kt"); - } - @Test @TestMetadata("negateObjectComp.kt") public void testNegateObjectComp() throws Exception { @@ -5830,12 +5806,6 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { runTest("compiler/testData/codegen/bytecodeText/whenStringOptimization/inlineStringConstInsideWhen.kt"); } - @Test - @TestMetadata("nonInlinedConst.kt") - public void testNonInlinedConst() throws Exception { - runTest("compiler/testData/codegen/bytecodeText/whenStringOptimization/nonInlinedConst.kt"); - } - @Test @TestMetadata("nullability.kt") public void testNullability() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java index 3ca74b80da3..05df8d73e63 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java @@ -7991,12 +7991,6 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/constants/kt9532.kt"); } - @Test - @TestMetadata("kt9532_lv10.kt") - public void testKt9532_lv10() throws Exception { - runTest("compiler/testData/codegen/box/constants/kt9532_lv10.kt"); - } - @Test @TestMetadata("long.kt") public void testLong() throws Exception { @@ -14769,12 +14763,6 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/delegation/simple.kt"); } - @Test - @TestMetadata("simple1.0.kt") - public void testSimple1_0() throws Exception { - runTest("compiler/testData/codegen/box/delegation/simple1.0.kt"); - } - @Test @TestMetadata("viaTypeAlias.kt") public void testViaTypeAlias() throws Exception { @@ -27383,12 +27371,6 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/jdk/stream.kt"); } - @Test - @TestMetadata("streamBackwardCompatibility.kt") - public void testStreamBackwardCompatibility() throws Exception { - runTest("compiler/testData/codegen/box/jdk/streamBackwardCompatibility.kt"); - } - @Test @TestMetadata("useStream.kt") public void testUseStream() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBytecodeTextTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBytecodeTextTestGenerated.java index e21670e3c61..beed2f9f0cc 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBytecodeTextTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBytecodeTextTestGenerated.java @@ -1444,18 +1444,6 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { runTest("compiler/testData/codegen/bytecodeText/constProperty/noAccessorsForPrivateConstants.kt"); } - @Test - @TestMetadata("noInline.kt") - public void testNoInline() throws Exception { - runTest("compiler/testData/codegen/bytecodeText/constProperty/noInline.kt"); - } - - @Test - @TestMetadata("noInlineInCmp.kt") - public void testNoInlineInCmp() throws Exception { - runTest("compiler/testData/codegen/bytecodeText/constProperty/noInlineInCmp.kt"); - } - @Test @TestMetadata("nonConstValHasNoDefaultValue_after.kt") public void testNonConstValHasNoDefaultValue_after() throws Exception { @@ -1566,12 +1554,6 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { runTest("compiler/testData/codegen/bytecodeText/constants/noInlineNonStaticJavaField.kt"); } - @Test - @TestMetadata("noInlineNonStaticJavaField_lv10.kt") - public void testNoInlineNonStaticJavaField_lv10() throws Exception { - runTest("compiler/testData/codegen/bytecodeText/constants/noInlineNonStaticJavaField_lv10.kt"); - } - @Test @TestMetadata("nullableByteAndShort.kt") public void testNullableByteAndShort() throws Exception { @@ -4314,12 +4296,6 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { runTest("compiler/testData/codegen/bytecodeText/lazyCodegen/negateConst.kt"); } - @Test - @TestMetadata("negateConstantCompare.kt") - public void testNegateConstantCompare() throws Exception { - runTest("compiler/testData/codegen/bytecodeText/lazyCodegen/negateConstantCompare.kt"); - } - @Test @TestMetadata("negateObjectComp.kt") public void testNegateObjectComp() throws Exception { @@ -5980,12 +5956,6 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { runTest("compiler/testData/codegen/bytecodeText/whenStringOptimization/inlineStringConstInsideWhen.kt"); } - @Test - @TestMetadata("nonInlinedConst.kt") - public void testNonInlinedConst() throws Exception { - runTest("compiler/testData/codegen/bytecodeText/whenStringOptimization/nonInlinedConst.kt"); - } - @Test @TestMetadata("nullability.kt") public void testNullability() throws Exception { diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java index 2f454600a07..b93abf93f17 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -6021,11 +6021,6 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/constants/kt9532.kt"); } - @TestMetadata("kt9532_lv10.kt") - public void testKt9532_lv10() throws Exception { - runTest("compiler/testData/codegen/box/constants/kt9532_lv10.kt"); - } - @TestMetadata("long.kt") public void testLong() throws Exception { runTest("compiler/testData/codegen/box/constants/long.kt"); @@ -11982,11 +11977,6 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/delegation/simple.kt"); } - @TestMetadata("simple1.0.kt") - public void testSimple1_0() throws Exception { - runTest("compiler/testData/codegen/box/delegation/simple1.0.kt"); - } - @TestMetadata("viaTypeAlias.kt") public void testViaTypeAlias() throws Exception { runTest("compiler/testData/codegen/box/delegation/viaTypeAlias.kt"); @@ -20831,11 +20821,6 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/jdk/stream.kt"); } - @TestMetadata("streamBackwardCompatibility.kt") - public void testStreamBackwardCompatibility() throws Exception { - runTest("compiler/testData/codegen/box/jdk/streamBackwardCompatibility.kt"); - } - @TestMetadata("useStream.kt") public void testUseStream() throws Exception { runTest("compiler/testData/codegen/box/jdk/useStream.kt"); diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/JsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/JsCodegenBoxTestGenerated.java index 0938c267ec2..58e7470602e 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/JsCodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/JsCodegenBoxTestGenerated.java @@ -5263,12 +5263,6 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/constants/kt9532.kt"); } - @Test - @TestMetadata("kt9532_lv10.kt") - public void testKt9532_lv10() throws Exception { - runTest("compiler/testData/codegen/box/constants/kt9532_lv10.kt"); - } - @Test @TestMetadata("long.kt") public void testLong() throws Exception { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java index 66431197a95..dbfbe0858f6 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java @@ -5305,12 +5305,6 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/constants/kt9532.kt"); } - @Test - @TestMetadata("kt9532_lv10.kt") - public void testKt9532_lv10() throws Exception { - runTest("compiler/testData/codegen/box/constants/kt9532_lv10.kt"); - } - @Test @TestMetadata("long.kt") public void testLong() throws Exception { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/testOld/wasm/semantics/IrCodegenBoxWasmTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/testOld/wasm/semantics/IrCodegenBoxWasmTestGenerated.java index da5d9dc5b9a..4e20f8d53ae 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/testOld/wasm/semantics/IrCodegenBoxWasmTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/testOld/wasm/semantics/IrCodegenBoxWasmTestGenerated.java @@ -4681,11 +4681,6 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/constants/kt9532.kt"); } - @TestMetadata("kt9532_lv10.kt") - public void testKt9532_lv10() throws Exception { - runTest("compiler/testData/codegen/box/constants/kt9532_lv10.kt"); - } - @TestMetadata("long.kt") public void testLong() throws Exception { runTest("compiler/testData/codegen/box/constants/long.kt"); diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/ExternalTestGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/ExternalTestGenerated.java index 87d1015ae40..4fdc1eb59bc 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/ExternalTestGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/ExternalTestGenerated.java @@ -6085,12 +6085,6 @@ public class ExternalTestGenerated extends AbstractExternalNativeBlackBoxTest { runTest("compiler/testData/codegen/box/constants/kt9532.kt"); } - @Test - @TestMetadata("kt9532_lv10.kt") - public void testKt9532_lv10() throws Exception { - runTest("compiler/testData/codegen/box/constants/kt9532_lv10.kt"); - } - @Test @TestMetadata("long.kt") public void testLong() throws Exception {