From e6d923f65c14b9acb7a10c18be47274f53e3e426 Mon Sep 17 00:00:00 2001 From: pyos Date: Mon, 19 Apr 2021 10:14:16 +0200 Subject: [PATCH] FIR: rename HIDDEN to INVISIBLE_REFERENCE Some of them should be INVISIBLE_MEMBER though --- .../arguments/ambiguityOnJavaOverride.kt | 2 +- .../diagnostics/sealedClassConstructorCall.kt | 2 +- .../resolve/expresssions/nestedVisibility.kt | 12 +++---- .../resolve/expresssions/privateVisibility.kt | 18 +++++------ .../expresssions/protectedVisibility.kt | 6 ++-- .../visibility/singletonConstructors.kt | 4 +-- .../visibility/visibilityWithOverrides.kt | 2 +- .../resolveWithStdlib/j+k/JavaVisibility2.kt | 14 ++++---- .../lowPriorityInResolution.kt | 2 +- .../diagnostics/FirDiagnosticsList.kt | 4 +-- .../fir/analysis/diagnostics/FirErrors.kt | 2 +- .../diagnostics/FirDefaultErrorMessages.kt | 4 +-- .../coneDiagnosticToFirDiagnostic.kt | 2 +- .../resolveWithLowPriorityAnnotation.kt | 1 - .../jvmPackageName.kt | 1 - .../jvmPackageNameInRootPackage.kt | 1 - .../jvmPackageNameMultifileClass.kt | 1 - .../jvmPackageNameWithJvmName.kt | 1 - .../box/jvmPackageName/anonymousObject.kt | 1 - ...anonymousObjectInInheritedMultifilePart.kt | 1 - .../anonymousObjectInMultifilePart.kt | 1 - .../codegen/box/jvmPackageName/localClass.kt | 1 - .../box/jvmPackageName/metadataField.kt | 1 - .../box/jvmPackageName/multifileClass.kt | 1 - .../codegen/box/jvmPackageName/rootPackage.kt | 1 - .../codegen/box/jvmPackageName/simple.kt | 1 - .../codegen/box/jvmPackageName/withJvmName.kt | 1 - .../boxInline/jvmPackageName/simple.kt | 1 - .../smap/inlineOnly/noSmapWithProperty.kt | 2 +- .../smap/inlineOnly/stdlibInlineOnly.kt | 1 - .../inlineOnly/stdlibInlineOnlyOneLine.kt | 2 +- .../inlineUsedAsNoinline/inlineOnly.kt | 1 - .../tests/ConstructorsOfPrimitives.fir.kt | 2 +- .../tests/PackageInExpressionPosition.fir.kt | 2 +- .../tests/PrivateFromOuterPackage.fir.kt | 8 ++--- .../illegalRequireKotlinValue.fir.kt | 22 ++++++------- .../classObjects/ClassObjectVisibility.fir.kt | 2 +- .../classObjects/invisibleClassObjects.fir.kt | 8 ++--- .../withInvisibleSynthesized.fir.kt | 6 ++-- .../enum/ConstructorCallFromOutside.fir.kt | 2 +- .../tests/enum/inheritanceFromEnum.fir.kt | 2 +- .../exposed/exceptionOnFakeInvisible.fir.kt | 2 +- .../tests/imports/CheckJavaVisibility2.fir.kt | 14 ++++---- .../tests/imports/ImportPrivateMember.fir.kt | 2 +- .../imports/InaccessiblePrivateClass.fir.kt | 2 +- .../PackageLocalClassReferencedError.fir.kt | 2 +- .../PrivateClassReferencedError.fir.kt | 2 +- .../invisibleFakeReferenceInImport.fir.kt | 2 +- .../tests/incompleteCode/kt2014.fir.kt | 2 +- .../inference/completion/withExact.fir.kt | 2 +- ...putTypesWithMultilevelIncorporation.fir.kt | 15 --------- ...lyInputTypesWithMultilevelIncorporation.kt | 1 + .../typeParameterAsUpperBound.fir.kt | 2 +- .../diagnostics/tests/inner/visibility.fir.kt | 12 +++---- ...isiblePackagePrivateInheritedMember.fir.kt | 2 +- .../tests/j+k/packageVisibility.fir.kt | 16 +++++----- ...privateCandidatesWithWrongArguments.fir.kt | 2 +- .../PackagePrivateAndPublicNested.fir.kt | 2 +- .../tests/multimodule/internal.fir.kt | 16 +++++----- .../tests/multimodule/packagePrivate.fir.kt | 4 +-- .../multimodule/publishedApiInternal.fir.kt | 32 +++++++++---------- .../nullabilityAndSmartCasts/kt362.fir.kt | 4 +-- .../topLevelAnnotationCall.fir.kt | 6 ++-- .../tests/privateInFile/visibility.fir.kt | 12 +++---- .../invoke/errors/invisibleInvoke.fir.kt | 4 +-- .../noCandidates/resolvedToClassifier.fir.kt | 2 +- .../resolvedToClassifierWithReceiver.fir.kt | 4 +-- .../scopes/VisibilityInClassObject.fir.kt | 6 ++-- .../scopes/VisibilityInheritModifier.fir.kt | 2 +- .../statics/hidePrivateByPublic.fir.kt | 4 +-- .../diagnostics/tests/scopes/kt1244.fir.kt | 2 +- .../diagnostics/tests/scopes/kt151.fir.kt | 2 +- .../diagnostics/tests/scopes/kt1738.fir.kt | 2 +- .../diagnostics/tests/scopes/kt1805.fir.kt | 6 ++-- .../diagnostics/tests/scopes/kt1806.fir.kt | 4 +-- .../diagnostics/tests/scopes/kt1942.fir.kt | 2 +- .../diagnostics/tests/scopes/kt37.fir.kt | 2 +- .../diagnostics/tests/scopes/kt9430.fir.kt | 2 +- .../innerProtectedClass.fir.kt | 2 +- .../javaInheritedInKotlin.fir.kt | 14 ++++---- .../protectedCallOnSubClass.fir.kt | 4 +-- .../syntheticPropertyExtensions.fir.kt | 2 +- .../syntheticSAMExtensions.fir.kt | 2 +- .../tests/scopes/visibility.fir.kt | 10 +++--- .../tests/scopes/visibility2.fir.kt | 8 ++--- .../tests/scopes/visibility3.fir.kt | 12 +++---- .../errorsOnEmptyDelegationCall.fir.kt | 2 +- .../javaProperties/OnlyPublic.fir.kt | 6 ++-- .../SetterHasHigherAccess.fir.kt | 6 ++-- .../samAdapters/PackageLocal.fir.kt | 2 +- .../samAdapters/Private.fir.kt | 2 +- .../samAdapters/Protected.fir.kt | 2 +- .../tests/typealias/privateInFile.fir.kt | 2 +- .../typealias/typeAliasConstructor.fir.kt | 4 +-- .../typeAliasConstructorWrongClass.fir.kt | 8 ++--- ...allDefaultConstructorOfUnsignedType.fir.kt | 2 +- .../privateToThis/FunctionCall.fir.kt | 2 +- .../variance/privateToThis/GetVal.fir.kt | 2 +- .../variance/privateToThis/SetVar.fir.kt | 2 +- .../CallCompanionProtectedNonStatic.fir.kt | 8 ++--- .../incorrectJvmPackageName.fir.kt | 10 +++--- .../experimental/wasExperimental.fir.kt | 8 ++--- ...ckLowPriorityIsResolvedSuccessfully.fir.kt | 15 --------- .../checkLowPriorityIsResolvedSuccessfully.kt | 1 + ...tAnnotationWithUpperBoundConstraint.fir.kt | 2 +- ...xplicitTypeArgumentAsValidInputType.fir.kt | 2 +- .../internalAnnotationsOnTypes.fir.kt | 30 ----------------- .../internalAnnotationsOnTypes.kt | 1 + .../annotationsForResolve/kt26698.fir.kt | 6 ++-- .../annotationsForResolve/kt35210.fir.kt | 12 ------- .../annotationsForResolve/kt35210.kt | 1 + .../noInferAndLowPriority.fir.kt | 4 +-- .../noInferAnnotation.fir.kt | 10 +++--- .../onlyInputTypeAndJava.fir.kt | 18 ----------- .../onlyInputTypeAndJava.kt | 1 + ...putTypeRecursiveBoundAndProjections.fir.kt | 24 -------------- ...lyInputTypeRecursiveBoundAndProjections.kt | 1 + .../onlyInputTypes.fir.kt | 2 +- .../onlyInputTypesAndLowPriority.fir.kt | 8 ++--- ...yInputTypesAndTopLevelCapturedTypes.fir.kt | 6 ++-- ...putTypesAnnotationWithPlatformTypes.fir.kt | 19 ----------- ...lyInputTypesAnnotationWithPlatformTypes.kt | 1 + .../onlyInputTypesCaptured.fir.kt | 4 +-- ...nlyInputTypesCommonConstraintSystem.fir.kt | 4 +-- .../onlyInputTypesUpperBound.fir.kt | 2 +- .../onlyInputTypesWarning.fir.kt | 2 +- ...resolveWithOnlyInputTypesAnnotation.fir.kt | 4 +-- ...inlineOnlySuppressesNothingToInline.fir.kt | 31 ------------------ .../inlineOnlySuppressesNothingToInline.kt | 1 + .../testsWithStdLib/pureReifiable.fir.kt | 12 ------- .../testsWithStdLib/pureReifiable.kt | 1 + .../resolve/hidesMembers.fir.kt | 8 ++--- .../resolve/hidesMembers2.fir.kt | 8 ++--- .../abstract-classes/p-2/neg/1.8.fir.kt | 20 ++++++------ .../kotlin.nothing/p-1/neg/2.1.fir.kt | 2 +- .../diagnostics/KtFirDataClassConverters.kt | 4 +-- .../api/fir/diagnostics/KtFirDiagnostics.kt | 6 ++-- .../fir/diagnostics/KtFirDiagnosticsImpl.kt | 6 ++-- .../fullPackageFQNameOnVisiblityError.fir.kt | 2 +- 139 files changed, 284 insertions(+), 468 deletions(-) delete mode 100644 compiler/testData/diagnostics/tests/inference/onlyInputTypesWithMultilevelIncorporation.fir.kt delete mode 100644 compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/checkLowPriorityIsResolvedSuccessfully.fir.kt delete mode 100644 compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/internalAnnotationsOnTypes.fir.kt delete mode 100644 compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/kt35210.fir.kt delete mode 100644 compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypeAndJava.fir.kt delete mode 100644 compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypeRecursiveBoundAndProjections.fir.kt delete mode 100644 compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypesAnnotationWithPlatformTypes.fir.kt delete mode 100644 compiler/testData/diagnostics/testsWithStdLib/inline/inlineOnlySuppressesNothingToInline.fir.kt delete mode 100644 compiler/testData/diagnostics/testsWithStdLib/pureReifiable.fir.kt diff --git a/compiler/fir/analysis-tests/testData/resolve/arguments/ambiguityOnJavaOverride.kt b/compiler/fir/analysis-tests/testData/resolve/arguments/ambiguityOnJavaOverride.kt index ac36f03e9f6..091eaed7b90 100644 --- a/compiler/fir/analysis-tests/testData/resolve/arguments/ambiguityOnJavaOverride.kt +++ b/compiler/fir/analysis-tests/testData/resolve/arguments/ambiguityOnJavaOverride.kt @@ -15,5 +15,5 @@ class B : A() { } fun test(b: B) { - b.foo("") + b.foo("") } diff --git a/compiler/fir/analysis-tests/testData/resolve/diagnostics/sealedClassConstructorCall.kt b/compiler/fir/analysis-tests/testData/resolve/diagnostics/sealedClassConstructorCall.kt index c4717ff1394..8e3450ddd4a 100644 --- a/compiler/fir/analysis-tests/testData/resolve/diagnostics/sealedClassConstructorCall.kt +++ b/compiler/fir/analysis-tests/testData/resolve/diagnostics/sealedClassConstructorCall.kt @@ -1,3 +1,3 @@ sealed class A -val b = A() +val b = A() diff --git a/compiler/fir/analysis-tests/testData/resolve/expresssions/nestedVisibility.kt b/compiler/fir/analysis-tests/testData/resolve/expresssions/nestedVisibility.kt index 73ed9de9800..8de16ab98ad 100644 --- a/compiler/fir/analysis-tests/testData/resolve/expresssions/nestedVisibility.kt +++ b/compiler/fir/analysis-tests/testData/resolve/expresssions/nestedVisibility.kt @@ -11,8 +11,8 @@ open class Outer { class Derived : Outer() { fun foo() { - Outer.PrivateNested() - super.PrivateInner() + Outer.PrivateNested() + super.PrivateInner() Outer.ProtectedNested() super.ProtectedInner() @@ -23,11 +23,11 @@ class Derived : Outer() { } fun foo() { - Outer.PrivateNested() - Outer().PrivateInner() + Outer.PrivateNested() + Outer().PrivateInner() - Outer.ProtectedNested() - Outer().ProtectedInner() + Outer.ProtectedNested() + Outer().ProtectedInner() Outer.PublicNested() Outer().PublicInner() diff --git a/compiler/fir/analysis-tests/testData/resolve/expresssions/privateVisibility.kt b/compiler/fir/analysis-tests/testData/resolve/expresssions/privateVisibility.kt index c61aef1fbcf..fc4799f6d89 100644 --- a/compiler/fir/analysis-tests/testData/resolve/expresssions/privateVisibility.kt +++ b/compiler/fir/analysis-tests/testData/resolve/expresssions/privateVisibility.kt @@ -9,21 +9,21 @@ private class Private { bar() Nested() fromCompanion() - NotCompanion.foo() // hidden + NotCompanion.foo() // hidden } inner class Inner { fun foo() { bar() fromCompanion() - NotCompanion.foo() // hidden + NotCompanion.foo() // hidden } } private class Nested { fun foo() { fromCompanion() - NotCompanion.foo() // hidden + NotCompanion.foo() // hidden } } @@ -54,7 +54,7 @@ fun withLocals() { Local().baz() - Local().bar() // hidden + Local().bar() // hidden } fun test() { @@ -62,14 +62,14 @@ fun test() { Private().baz() Private().Inner() - Private().bar() // hidden - Private.Nested() // hidden - Private.fromCompanion() // hidden + Private().bar() // hidden + Private.Nested() // hidden + Private.fromCompanion() // hidden } // FILE: second.kt fun secondTest() { - foo() // hidden - Private() // hidden + foo() // hidden + Private() // hidden } diff --git a/compiler/fir/analysis-tests/testData/resolve/expresssions/protectedVisibility.kt b/compiler/fir/analysis-tests/testData/resolve/expresssions/protectedVisibility.kt index f27cce779d2..f50885b96b5 100644 --- a/compiler/fir/analysis-tests/testData/resolve/expresssions/protectedVisibility.kt +++ b/compiler/fir/analysis-tests/testData/resolve/expresssions/protectedVisibility.kt @@ -31,7 +31,7 @@ class Derived : Protected() { fun foo() { bar() Nested().foo() - Nested().bar() // hidden + Nested().bar() // hidden fromCompanion() protectedFromCompanion() @@ -48,8 +48,8 @@ fun test() { Protected().baz() Protected().Inner() - Protected().bar() // hidden - Protected.Nested() // hidden + Protected().bar() // hidden + Protected.Nested() // hidden } open class Generic(val x: T) { diff --git a/compiler/fir/analysis-tests/testData/resolve/visibility/singletonConstructors.kt b/compiler/fir/analysis-tests/testData/resolve/visibility/singletonConstructors.kt index 51a43a129e8..0d4bcd67c04 100644 --- a/compiler/fir/analysis-tests/testData/resolve/visibility/singletonConstructors.kt +++ b/compiler/fir/analysis-tests/testData/resolve/visibility/singletonConstructors.kt @@ -2,12 +2,12 @@ class A { companion object Comp {} fun foo() { - Comp() + Comp() } } object B { - private val x = B() + private val x = B() } class D { diff --git a/compiler/fir/analysis-tests/testData/resolve/visibility/visibilityWithOverrides.kt b/compiler/fir/analysis-tests/testData/resolve/visibility/visibilityWithOverrides.kt index 9e5875af43c..46bf160c8da 100644 --- a/compiler/fir/analysis-tests/testData/resolve/visibility/visibilityWithOverrides.kt +++ b/compiler/fir/analysis-tests/testData/resolve/visibility/visibilityWithOverrides.kt @@ -19,5 +19,5 @@ abstract class A { // FILE: main.kt fun test(b: B): String { - return b foo "hello" // should be an error + return b foo "hello" // should be an error } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/JavaVisibility2.kt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/JavaVisibility2.kt index 46bc2d36099..dc66f4ed903 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/JavaVisibility2.kt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/JavaVisibility2.kt @@ -22,24 +22,24 @@ import j.JavaProtected import j.JavaPackageLocal class A { - val p1 = JavaPackageLocal.javaPPackage - val p2 = JavaProtected.javaPProtectedStatic - val p3 = JavaProtected().javaPProtectedPackage + val p1 = JavaPackageLocal.javaPPackage + val p2 = JavaProtected.javaPProtectedStatic + val p3 = JavaProtected().javaPProtectedPackage fun test() { - JavaProtected.javaMProtectedStatic() - JavaPackageLocal.javaMPackage() + JavaProtected.javaMProtectedStatic() + JavaPackageLocal.javaMPackage() } } class B : JavaProtected() { - val p1 = JavaPackageLocal.javaPPackage + val p1 = JavaPackageLocal.javaPPackage val p2 = JavaProtected.javaPProtectedStatic val p3 = javaPProtectedPackage fun test() { JavaProtected.javaMProtectedStatic() - JavaPackageLocal.javaMPackage() + JavaPackageLocal.javaMPackage() } } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/lowPriorityInResolution.kt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/lowPriorityInResolution.kt index 7e7ce0cabdf..d55b33dd580 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/lowPriorityInResolution.kt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/lowPriorityInResolution.kt @@ -1,5 +1,5 @@ @Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") -@kotlin.internal.LowPriorityInOverloadResolution +@kotlin.internal.LowPriorityInOverloadResolution fun foo(): Int = 1 fun foo(): String = "" diff --git a/compiler/fir/checkers/checkers-component-generator/src/org/jetbrains/kotlin/fir/checkers/generator/diagnostics/FirDiagnosticsList.kt b/compiler/fir/checkers/checkers-component-generator/src/org/jetbrains/kotlin/fir/checkers/generator/diagnostics/FirDiagnosticsList.kt index 5721a87bed0..8512e7fdd73 100644 --- a/compiler/fir/checkers/checkers-component-generator/src/org/jetbrains/kotlin/fir/checkers/generator/diagnostics/FirDiagnosticsList.kt +++ b/compiler/fir/checkers/checkers-component-generator/src/org/jetbrains/kotlin/fir/checkers/generator/diagnostics/FirDiagnosticsList.kt @@ -69,8 +69,8 @@ object DIAGNOSTICS_LIST : DiagnosticList() { } val UNRESOLVED by object : DiagnosticGroup("Unresolved") { - val HIDDEN by error(PositioningStrategy.REFERENCE_BY_QUALIFIED) { - parameter>("hidden") + val INVISIBLE_REFERENCE by error(PositioningStrategy.REFERENCE_BY_QUALIFIED) { + parameter>("reference") } val UNRESOLVED_REFERENCE by error(PositioningStrategy.REFERENCED_NAME_BY_QUALIFIED) { parameter("reference") diff --git a/compiler/fir/checkers/gen/org/jetbrains/kotlin/fir/analysis/diagnostics/FirErrors.kt b/compiler/fir/checkers/gen/org/jetbrains/kotlin/fir/analysis/diagnostics/FirErrors.kt index 6053ace81a7..e4586c1267f 100644 --- a/compiler/fir/checkers/gen/org/jetbrains/kotlin/fir/analysis/diagnostics/FirErrors.kt +++ b/compiler/fir/checkers/gen/org/jetbrains/kotlin/fir/analysis/diagnostics/FirErrors.kt @@ -96,7 +96,7 @@ object FirErrors { val DIVISION_BY_ZERO by warning0() // Unresolved - val HIDDEN by error1>(SourceElementPositioningStrategies.REFERENCE_BY_QUALIFIED) + val INVISIBLE_REFERENCE by error1>(SourceElementPositioningStrategies.REFERENCE_BY_QUALIFIED) val UNRESOLVED_REFERENCE by error1(SourceElementPositioningStrategies.REFERENCED_NAME_BY_QUALIFIED) val UNRESOLVED_LABEL by error0() val DESERIALIZATION_ERROR by error0() diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/FirDefaultErrorMessages.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/FirDefaultErrorMessages.kt index fef8bdaaa72..7dc6ecb6661 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/FirDefaultErrorMessages.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/FirDefaultErrorMessages.kt @@ -116,7 +116,6 @@ import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.FUN_INTERFACE_CON import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.GENERIC_THROWABLE_SUBCLASS import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.GETTER_VISIBILITY_DIFFERS_FROM_PROPERTY_VISIBILITY import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.HAS_NEXT_FUNCTION_AMBIGUITY -import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.HIDDEN import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.ILLEGAL_CONST_EXPRESSION import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.ILLEGAL_UNDERSCORE import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.INAPPLICABLE_CANDIDATE @@ -140,6 +139,7 @@ import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.INSTANCE_ACCESS_B import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.INTERFACE_WITH_SUPERCLASS import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.INVALID_IF_AS_EXPRESSION import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.INVALID_TYPE_OF_ANNOTATION_MEMBER +import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.INVISIBLE_REFERENCE import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.ITERATOR_AMBIGUITY import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.KCLASS_WITH_NULLABLE_TYPE_PARAMETER_IN_SIGNATURE import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.LEAKED_IN_PLACE_LAMBDA @@ -320,7 +320,7 @@ class FirDefaultErrorMessages : DefaultErrorMessages.Extension { map.put(NESTED_CLASS_NOT_ALLOWED, "{0} is not allowed here", TO_STRING) // Unresolved - map.put(HIDDEN, "Symbol {0} is invisible", SYMBOL) + map.put(INVISIBLE_REFERENCE, "Symbol {0} is invisible", SYMBOL) map.put(UNRESOLVED_REFERENCE, "Unresolved reference: {0}", NULLABLE_STRING) map.put(UNRESOLVED_LABEL, "Unresolved label") map.put(DESERIALIZATION_ERROR, "Deserialization error") diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/coneDiagnosticToFirDiagnostic.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/coneDiagnosticToFirDiagnostic.kt index bfc45a2a4fe..2873a69b4d3 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/coneDiagnosticToFirDiagnostic.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/coneDiagnosticToFirDiagnostic.kt @@ -30,7 +30,7 @@ private fun ConeDiagnostic.toFirDiagnostic( is ConeUnresolvedSymbolError -> FirErrors.UNRESOLVED_REFERENCE.on(source, this.classId.asString()) is ConeUnresolvedNameError -> FirErrors.UNRESOLVED_REFERENCE.on(source, this.name.asString()) is ConeUnresolvedQualifierError -> FirErrors.UNRESOLVED_REFERENCE.on(source, this.qualifier) - is ConeHiddenCandidateError -> FirErrors.HIDDEN.on(source, this.candidateSymbol) + is ConeHiddenCandidateError -> FirErrors.INVISIBLE_REFERENCE.on(source, this.candidateSymbol) is ConeAmbiguityError -> if (this.applicability.isSuccess) { FirErrors.OVERLOAD_RESOLUTION_AMBIGUITY.on(source, this.candidates.map { it.symbol }) } else if (this.applicability == CandidateApplicability.UNSAFE_CALL) { diff --git a/compiler/testData/codegen/box/annotations/resolveWithLowPriorityAnnotation.kt b/compiler/testData/codegen/box/annotations/resolveWithLowPriorityAnnotation.kt index 908eb2dc040..9b51c9fdb51 100644 --- a/compiler/testData/codegen/box/annotations/resolveWithLowPriorityAnnotation.kt +++ b/compiler/testData/codegen/box/annotations/resolveWithLowPriorityAnnotation.kt @@ -1,4 +1,3 @@ -// IGNORE_FIR_DIAGNOSTICS // WITH_RUNTIME @Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") diff --git a/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmPackageName.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmPackageName.kt index 77b05692b11..cfe881deb17 100644 --- a/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmPackageName.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmPackageName.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_STDLIB diff --git a/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmPackageNameInRootPackage.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmPackageNameInRootPackage.kt index 99bb9a443a9..67104609cd8 100644 --- a/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmPackageNameInRootPackage.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmPackageNameInRootPackage.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_STDLIB diff --git a/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmPackageNameMultifileClass.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmPackageNameMultifileClass.kt index 73bb3d1ee5d..4c2a3ae4185 100644 --- a/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmPackageNameMultifileClass.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmPackageNameMultifileClass.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmPackageNameWithJvmName.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmPackageNameWithJvmName.kt index 0fbd87621b3..9f6f63c57c2 100644 --- a/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmPackageNameWithJvmName.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmPackageNameWithJvmName.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // MODULE: lib // WITH_STDLIB diff --git a/compiler/testData/codegen/box/jvmPackageName/anonymousObject.kt b/compiler/testData/codegen/box/jvmPackageName/anonymousObject.kt index fdfe8678dad..8258ca2b458 100644 --- a/compiler/testData/codegen/box/jvmPackageName/anonymousObject.kt +++ b/compiler/testData/codegen/box/jvmPackageName/anonymousObject.kt @@ -1,6 +1,5 @@ // TARGET_BACKEND: JVM // WITH_RUNTIME -// IGNORE_FIR_DIAGNOSTICS // FILE: anonymousObject.kt import x.* diff --git a/compiler/testData/codegen/box/jvmPackageName/anonymousObjectInInheritedMultifilePart.kt b/compiler/testData/codegen/box/jvmPackageName/anonymousObjectInInheritedMultifilePart.kt index 933d14fc03b..b3f5358937e 100644 --- a/compiler/testData/codegen/box/jvmPackageName/anonymousObjectInInheritedMultifilePart.kt +++ b/compiler/testData/codegen/box/jvmPackageName/anonymousObjectInInheritedMultifilePart.kt @@ -1,6 +1,5 @@ // TARGET_BACKEND: JVM // WITH_RUNTIME -// IGNORE_FIR_DIAGNOSTICS // IGNORE_LIGHT_ANALYSIS // !INHERIT_MULTIFILE_PARTS diff --git a/compiler/testData/codegen/box/jvmPackageName/anonymousObjectInMultifilePart.kt b/compiler/testData/codegen/box/jvmPackageName/anonymousObjectInMultifilePart.kt index 3b14e7a35ac..49f865f34d0 100644 --- a/compiler/testData/codegen/box/jvmPackageName/anonymousObjectInMultifilePart.kt +++ b/compiler/testData/codegen/box/jvmPackageName/anonymousObjectInMultifilePart.kt @@ -1,6 +1,5 @@ // TARGET_BACKEND: JVM // WITH_RUNTIME -// IGNORE_FIR_DIAGNOSTICS // FILE: anonymousObject.kt import x.* diff --git a/compiler/testData/codegen/box/jvmPackageName/localClass.kt b/compiler/testData/codegen/box/jvmPackageName/localClass.kt index 5b4182b6078..c667ad05c12 100644 --- a/compiler/testData/codegen/box/jvmPackageName/localClass.kt +++ b/compiler/testData/codegen/box/jvmPackageName/localClass.kt @@ -1,6 +1,5 @@ // TARGET_BACKEND: JVM // WITH_RUNTIME -// IGNORE_FIR_DIAGNOSTICS // FILE: anonymousObject.kt import x.* diff --git a/compiler/testData/codegen/box/jvmPackageName/metadataField.kt b/compiler/testData/codegen/box/jvmPackageName/metadataField.kt index f38a67b0157..7efd2b4eb9e 100644 --- a/compiler/testData/codegen/box/jvmPackageName/metadataField.kt +++ b/compiler/testData/codegen/box/jvmPackageName/metadataField.kt @@ -1,4 +1,3 @@ -// IGNORE_FIR_DIAGNOSTICS // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/jvmPackageName/multifileClass.kt b/compiler/testData/codegen/box/jvmPackageName/multifileClass.kt index fbf5340c6bb..aba8692fa6b 100644 --- a/compiler/testData/codegen/box/jvmPackageName/multifileClass.kt +++ b/compiler/testData/codegen/box/jvmPackageName/multifileClass.kt @@ -1,4 +1,3 @@ -// IGNORE_FIR_DIAGNOSTICS // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/jvmPackageName/rootPackage.kt b/compiler/testData/codegen/box/jvmPackageName/rootPackage.kt index bbee85eea00..9a2c21a959a 100644 --- a/compiler/testData/codegen/box/jvmPackageName/rootPackage.kt +++ b/compiler/testData/codegen/box/jvmPackageName/rootPackage.kt @@ -1,4 +1,3 @@ -// IGNORE_FIR_DIAGNOSTICS // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/jvmPackageName/simple.kt b/compiler/testData/codegen/box/jvmPackageName/simple.kt index 55712c7ca7b..aecccdb64cd 100644 --- a/compiler/testData/codegen/box/jvmPackageName/simple.kt +++ b/compiler/testData/codegen/box/jvmPackageName/simple.kt @@ -1,4 +1,3 @@ -// IGNORE_FIR_DIAGNOSTICS // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/jvmPackageName/withJvmName.kt b/compiler/testData/codegen/box/jvmPackageName/withJvmName.kt index 1d639b16f06..ee9d09a4e98 100644 --- a/compiler/testData/codegen/box/jvmPackageName/withJvmName.kt +++ b/compiler/testData/codegen/box/jvmPackageName/withJvmName.kt @@ -1,4 +1,3 @@ -// IGNORE_FIR_DIAGNOSTICS // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/boxInline/jvmPackageName/simple.kt b/compiler/testData/codegen/boxInline/jvmPackageName/simple.kt index 58527113836..f4e2d6ab848 100644 --- a/compiler/testData/codegen/boxInline/jvmPackageName/simple.kt +++ b/compiler/testData/codegen/boxInline/jvmPackageName/simple.kt @@ -1,4 +1,3 @@ -// IGNORE_FIR_DIAGNOSTICS // TARGET_BACKEND: JVM // WITH_RUNTIME // FILE: 1.kt diff --git a/compiler/testData/codegen/boxInline/smap/inlineOnly/noSmapWithProperty.kt b/compiler/testData/codegen/boxInline/smap/inlineOnly/noSmapWithProperty.kt index f04188277c9..15d941a8b4f 100644 --- a/compiler/testData/codegen/boxInline/smap/inlineOnly/noSmapWithProperty.kt +++ b/compiler/testData/codegen/boxInline/smap/inlineOnly/noSmapWithProperty.kt @@ -1,8 +1,8 @@ -// IGNORE_FIR_DIAGNOSTICS // WITH_RUNTIME // FILE: 1.kt package test + inline fun stub() { } diff --git a/compiler/testData/codegen/boxInline/smap/inlineOnly/stdlibInlineOnly.kt b/compiler/testData/codegen/boxInline/smap/inlineOnly/stdlibInlineOnly.kt index 18874b70d92..6513aa629ee 100644 --- a/compiler/testData/codegen/boxInline/smap/inlineOnly/stdlibInlineOnly.kt +++ b/compiler/testData/codegen/boxInline/smap/inlineOnly/stdlibInlineOnly.kt @@ -1,4 +1,3 @@ -// IGNORE_FIR_DIAGNOSTICS // FILE: 1.kt package test diff --git a/compiler/testData/codegen/boxInline/smap/inlineOnly/stdlibInlineOnlyOneLine.kt b/compiler/testData/codegen/boxInline/smap/inlineOnly/stdlibInlineOnlyOneLine.kt index 8c19968808c..a5bad9fec40 100644 --- a/compiler/testData/codegen/boxInline/smap/inlineOnly/stdlibInlineOnlyOneLine.kt +++ b/compiler/testData/codegen/boxInline/smap/inlineOnly/stdlibInlineOnlyOneLine.kt @@ -1,5 +1,5 @@ -// IGNORE_FIR_DIAGNOSTICS // FILE: 1.kt + package test @Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") diff --git a/compiler/testData/codegen/boxInline/suspend/inlineUsedAsNoinline/inlineOnly.kt b/compiler/testData/codegen/boxInline/suspend/inlineUsedAsNoinline/inlineOnly.kt index d193875de66..d85373238fd 100644 --- a/compiler/testData/codegen/boxInline/suspend/inlineUsedAsNoinline/inlineOnly.kt +++ b/compiler/testData/codegen/boxInline/suspend/inlineUsedAsNoinline/inlineOnly.kt @@ -1,4 +1,3 @@ -// IGNORE_FIR_DIAGNOSTICS // WITH_RUNTIME // WITH_COROUTINES // NO_CHECK_LAMBDA_INLINING diff --git a/compiler/testData/diagnostics/tests/ConstructorsOfPrimitives.fir.kt b/compiler/testData/diagnostics/tests/ConstructorsOfPrimitives.fir.kt index 8c720027bc5..5ee10638fe2 100644 --- a/compiler/testData/diagnostics/tests/ConstructorsOfPrimitives.fir.kt +++ b/compiler/testData/diagnostics/tests/ConstructorsOfPrimitives.fir.kt @@ -5,6 +5,6 @@ fun test() { Int() Short() Byte() - Char() + Char() Boolean() } diff --git a/compiler/testData/diagnostics/tests/PackageInExpressionPosition.fir.kt b/compiler/testData/diagnostics/tests/PackageInExpressionPosition.fir.kt index 567a8f4b9b0..fe691499e4b 100644 --- a/compiler/testData/diagnostics/tests/PackageInExpressionPosition.fir.kt +++ b/compiler/testData/diagnostics/tests/PackageInExpressionPosition.fir.kt @@ -19,7 +19,7 @@ fun main() { java.lang.System = null java.lang.System!! System is Int - System() + System() (System) foo@ System null in System diff --git a/compiler/testData/diagnostics/tests/PrivateFromOuterPackage.fir.kt b/compiler/testData/diagnostics/tests/PrivateFromOuterPackage.fir.kt index 1d24360337c..c6bb8e61a31 100644 --- a/compiler/testData/diagnostics/tests/PrivateFromOuterPackage.fir.kt +++ b/compiler/testData/diagnostics/tests/PrivateFromOuterPackage.fir.kt @@ -10,8 +10,8 @@ package outer.p1 import outer.a fun use() { - a() - outer.B() + a() + outer.B() } // FILE: c.kt @@ -20,6 +20,6 @@ package outer.p1.p2 import outer.a fun use() { - a() - outer.B() + a() + outer.B() } diff --git a/compiler/testData/diagnostics/tests/annotations/illegalRequireKotlinValue.fir.kt b/compiler/testData/diagnostics/tests/annotations/illegalRequireKotlinValue.fir.kt index 0555c2e86a0..f253cd804d0 100644 --- a/compiler/testData/diagnostics/tests/annotations/illegalRequireKotlinValue.fir.kt +++ b/compiler/testData/diagnostics/tests/annotations/illegalRequireKotlinValue.fir.kt @@ -3,36 +3,36 @@ package test import kotlin.internal.RequireKotlin -@RequireKotlin("") +@RequireKotlin("") fun f01() {} -@RequireKotlin("x") +@RequireKotlin("x") fun f02() {} -@RequireKotlin("1") +@RequireKotlin("1") fun f03() {} -@RequireKotlin("1.0-beta") +@RequireKotlin("1.0-beta") fun f04() {} -@RequireKotlin("1.1.0-dev-1111") +@RequireKotlin("1.1.0-dev-1111") fun f05() {} -@RequireKotlin("1.5.3.7") +@RequireKotlin("1.5.3.7") fun f06() {} -@RequireKotlin("1..0") +@RequireKotlin("1..0") fun f07() {} -@RequireKotlin(" 1.0") +@RequireKotlin(" 1.0") fun f08() {} -@RequireKotlin("1.1") +@RequireKotlin("1.1") fun ok1() {} -@RequireKotlin("1.1.0") +@RequireKotlin("1.1.0") fun ok2() {} -@RequireKotlin("0.0.0") +@RequireKotlin("0.0.0") fun ok3() {} diff --git a/compiler/testData/diagnostics/tests/classObjects/ClassObjectVisibility.fir.kt b/compiler/testData/diagnostics/tests/classObjects/ClassObjectVisibility.fir.kt index ff02cf20513..5e555acec14 100644 --- a/compiler/testData/diagnostics/tests/classObjects/ClassObjectVisibility.fir.kt +++ b/compiler/testData/diagnostics/tests/classObjects/ClassObjectVisibility.fir.kt @@ -2,7 +2,7 @@ package foo fun test() { A.d - A.Companion.f + A.Companion.f B.D CCC CCC.classObjectVar diff --git a/compiler/testData/diagnostics/tests/classObjects/invisibleClassObjects.fir.kt b/compiler/testData/diagnostics/tests/classObjects/invisibleClassObjects.fir.kt index 1dc41911386..892f628129d 100644 --- a/compiler/testData/diagnostics/tests/classObjects/invisibleClassObjects.fir.kt +++ b/compiler/testData/diagnostics/tests/classObjects/invisibleClassObjects.fir.kt @@ -35,14 +35,14 @@ import a.D fun test() { f(A) - f(B) + f(B) f(C) - f(D) + f(D) A.foo() - B.bar() + B.bar() C.baz() - D.quux() + D.quux() a.A.foo() a.C.baz() diff --git a/compiler/testData/diagnostics/tests/dynamicTypes/withInvisibleSynthesized.fir.kt b/compiler/testData/diagnostics/tests/dynamicTypes/withInvisibleSynthesized.fir.kt index fe4ce752d1a..79618716a6d 100644 --- a/compiler/testData/diagnostics/tests/dynamicTypes/withInvisibleSynthesized.fir.kt +++ b/compiler/testData/diagnostics/tests/dynamicTypes/withInvisibleSynthesized.fir.kt @@ -21,15 +21,15 @@ import p.* class K: J.C() { fun dynamic.test() { - sam(null) - sam( + sam(null) + sam( name = null, name = null ) } fun test() { - sam(null) + sam(null) } } diff --git a/compiler/testData/diagnostics/tests/enum/ConstructorCallFromOutside.fir.kt b/compiler/testData/diagnostics/tests/enum/ConstructorCallFromOutside.fir.kt index 9057e9a5eee..d2544fefb87 100644 --- a/compiler/testData/diagnostics/tests/enum/ConstructorCallFromOutside.fir.kt +++ b/compiler/testData/diagnostics/tests/enum/ConstructorCallFromOutside.fir.kt @@ -6,5 +6,5 @@ enum class A(val c: Int) { fun createA(): A { // Error should be here! - return A(10) + return A(10) } diff --git a/compiler/testData/diagnostics/tests/enum/inheritanceFromEnum.fir.kt b/compiler/testData/diagnostics/tests/enum/inheritanceFromEnum.fir.kt index 21db81335c6..b36a5872ea8 100644 --- a/compiler/testData/diagnostics/tests/enum/inheritanceFromEnum.fir.kt +++ b/compiler/testData/diagnostics/tests/enum/inheritanceFromEnum.fir.kt @@ -8,6 +8,6 @@ open enum class MyEnum() { enum class MyEnum2() {} -class MyClass(): MyEnum2() {} +class MyClass(): MyEnum2() {} class MyClass2(): MyJavaEnum() {} diff --git a/compiler/testData/diagnostics/tests/exposed/exceptionOnFakeInvisible.fir.kt b/compiler/testData/diagnostics/tests/exposed/exceptionOnFakeInvisible.fir.kt index 7b653470296..cb7e8916491 100644 --- a/compiler/testData/diagnostics/tests/exposed/exceptionOnFakeInvisible.fir.kt +++ b/compiler/testData/diagnostics/tests/exposed/exceptionOnFakeInvisible.fir.kt @@ -7,6 +7,6 @@ fun bar(arg: String) = arg class Derived : Base("123") { private inline fun foo() { - bar(v) + bar(v) } } diff --git a/compiler/testData/diagnostics/tests/imports/CheckJavaVisibility2.fir.kt b/compiler/testData/diagnostics/tests/imports/CheckJavaVisibility2.fir.kt index 46bc2d36099..dc66f4ed903 100644 --- a/compiler/testData/diagnostics/tests/imports/CheckJavaVisibility2.fir.kt +++ b/compiler/testData/diagnostics/tests/imports/CheckJavaVisibility2.fir.kt @@ -22,24 +22,24 @@ import j.JavaProtected import j.JavaPackageLocal class A { - val p1 = JavaPackageLocal.javaPPackage - val p2 = JavaProtected.javaPProtectedStatic - val p3 = JavaProtected().javaPProtectedPackage + val p1 = JavaPackageLocal.javaPPackage + val p2 = JavaProtected.javaPProtectedStatic + val p3 = JavaProtected().javaPProtectedPackage fun test() { - JavaProtected.javaMProtectedStatic() - JavaPackageLocal.javaMPackage() + JavaProtected.javaMProtectedStatic() + JavaPackageLocal.javaMPackage() } } class B : JavaProtected() { - val p1 = JavaPackageLocal.javaPPackage + val p1 = JavaPackageLocal.javaPPackage val p2 = JavaProtected.javaPProtectedStatic val p3 = javaPProtectedPackage fun test() { JavaProtected.javaMProtectedStatic() - JavaPackageLocal.javaMPackage() + JavaPackageLocal.javaMPackage() } } diff --git a/compiler/testData/diagnostics/tests/imports/ImportPrivateMember.fir.kt b/compiler/testData/diagnostics/tests/imports/ImportPrivateMember.fir.kt index f7340913f57..91c491679d5 100644 --- a/compiler/testData/diagnostics/tests/imports/ImportPrivateMember.fir.kt +++ b/compiler/testData/diagnostics/tests/imports/ImportPrivateMember.fir.kt @@ -29,7 +29,7 @@ private object TopLevelObject { } fun testAccess() { - NestedClass() + NestedClass() E1 InNested() NestedEntry diff --git a/compiler/testData/diagnostics/tests/imports/InaccessiblePrivateClass.fir.kt b/compiler/testData/diagnostics/tests/imports/InaccessiblePrivateClass.fir.kt index b11568a67ba..b608e3c0d55 100644 --- a/compiler/testData/diagnostics/tests/imports/InaccessiblePrivateClass.fir.kt +++ b/compiler/testData/diagnostics/tests/imports/InaccessiblePrivateClass.fir.kt @@ -15,4 +15,4 @@ package p1 import p2.* val x: X = X() -val y: Y = Y() +val y: Y = Y() diff --git a/compiler/testData/diagnostics/tests/imports/PackageLocalClassReferencedError.fir.kt b/compiler/testData/diagnostics/tests/imports/PackageLocalClassReferencedError.fir.kt index f939d2e39be..043c14b4f00 100644 --- a/compiler/testData/diagnostics/tests/imports/PackageLocalClassReferencedError.fir.kt +++ b/compiler/testData/diagnostics/tests/imports/PackageLocalClassReferencedError.fir.kt @@ -8,4 +8,4 @@ package a import pack1.* -private class X : SomeClass() +private class X : SomeClass() diff --git a/compiler/testData/diagnostics/tests/imports/PrivateClassReferencedError.fir.kt b/compiler/testData/diagnostics/tests/imports/PrivateClassReferencedError.fir.kt index 53b743de2c4..c9aa814a7c4 100644 --- a/compiler/testData/diagnostics/tests/imports/PrivateClassReferencedError.fir.kt +++ b/compiler/testData/diagnostics/tests/imports/PrivateClassReferencedError.fir.kt @@ -11,4 +11,4 @@ package a import pack1.SomeClass.* -private class X : N() +private class X : N() diff --git a/compiler/testData/diagnostics/tests/imports/invisibleFakeReferenceInImport.fir.kt b/compiler/testData/diagnostics/tests/imports/invisibleFakeReferenceInImport.fir.kt index d78ec9bf63b..4218fd976f2 100644 --- a/compiler/testData/diagnostics/tests/imports/invisibleFakeReferenceInImport.fir.kt +++ b/compiler/testData/diagnostics/tests/imports/invisibleFakeReferenceInImport.fir.kt @@ -3,7 +3,7 @@ import B.foo fun test() { - foo + foo } // FILE: B.kt diff --git a/compiler/testData/diagnostics/tests/incompleteCode/kt2014.fir.kt b/compiler/testData/diagnostics/tests/incompleteCode/kt2014.fir.kt index b7159000e84..e663bf2568e 100644 --- a/compiler/testData/diagnostics/tests/incompleteCode/kt2014.fir.kt +++ b/compiler/testData/diagnostics/tests/incompleteCode/kt2014.fir.kt @@ -14,7 +14,7 @@ fun x(f : Foo) { f.a() c() - R() + R() } object R {} diff --git a/compiler/testData/diagnostics/tests/inference/completion/withExact.fir.kt b/compiler/testData/diagnostics/tests/inference/completion/withExact.fir.kt index cdee482a7ef..c8e5dfb8245 100644 --- a/compiler/testData/diagnostics/tests/inference/completion/withExact.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/completion/withExact.fir.kt @@ -6,7 +6,7 @@ import kotlin.internal.Exact class Inv(val arg: I) -class InvExact(val arg: @kotlin.internal.Exact E) +class InvExact(val arg: @kotlin.internal.Exact E) interface Base class Derived : Base diff --git a/compiler/testData/diagnostics/tests/inference/onlyInputTypesWithMultilevelIncorporation.fir.kt b/compiler/testData/diagnostics/tests/inference/onlyInputTypesWithMultilevelIncorporation.fir.kt deleted file mode 100644 index d200b75dfdf..00000000000 --- a/compiler/testData/diagnostics/tests/inference/onlyInputTypesWithMultilevelIncorporation.fir.kt +++ /dev/null @@ -1,15 +0,0 @@ -// WITH_RUNTIME -// !DIAGNOSTICS: -UNUSED_PARAMETER - -@file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") - -import kotlin.internal.OnlyInputTypes - -fun <@OnlyInputTypes T> assertEquals(expected: T, actual: T, message: String? = null) {} - -fun main() { - assertEquals( - mapOf(1 to "1", 2 to "2", 3 to "3"), - intArrayOf(1, 2, 3).associateWith { it.toString() } - ) -} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/inference/onlyInputTypesWithMultilevelIncorporation.kt b/compiler/testData/diagnostics/tests/inference/onlyInputTypesWithMultilevelIncorporation.kt index 54fa3deeae2..0b975eb63bd 100644 --- a/compiler/testData/diagnostics/tests/inference/onlyInputTypesWithMultilevelIncorporation.kt +++ b/compiler/testData/diagnostics/tests/inference/onlyInputTypesWithMultilevelIncorporation.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // WITH_RUNTIME // !DIAGNOSTICS: -UNUSED_PARAMETER diff --git a/compiler/testData/diagnostics/tests/inference/upperBounds/typeParameterAsUpperBound.fir.kt b/compiler/testData/diagnostics/tests/inference/upperBounds/typeParameterAsUpperBound.fir.kt index e1ed0ef2e7a..09a5baf7bce 100644 --- a/compiler/testData/diagnostics/tests/inference/upperBounds/typeParameterAsUpperBound.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/upperBounds/typeParameterAsUpperBound.fir.kt @@ -1,7 +1,7 @@ // !CHECK_TYPE -@kotlin.internal.InlineOnly +@kotlin.internal.InlineOnly public inline fun C.ifEmpty(f: () -> R): R where C : Collection<*>, C : R = if (isEmpty()) f() else this public fun listOf(t: T): List = TODO() diff --git a/compiler/testData/diagnostics/tests/inner/visibility.fir.kt b/compiler/testData/diagnostics/tests/inner/visibility.fir.kt index 73ed9de9800..8de16ab98ad 100644 --- a/compiler/testData/diagnostics/tests/inner/visibility.fir.kt +++ b/compiler/testData/diagnostics/tests/inner/visibility.fir.kt @@ -11,8 +11,8 @@ open class Outer { class Derived : Outer() { fun foo() { - Outer.PrivateNested() - super.PrivateInner() + Outer.PrivateNested() + super.PrivateInner() Outer.ProtectedNested() super.ProtectedInner() @@ -23,11 +23,11 @@ class Derived : Outer() { } fun foo() { - Outer.PrivateNested() - Outer().PrivateInner() + Outer.PrivateNested() + Outer().PrivateInner() - Outer.ProtectedNested() - Outer().ProtectedInner() + Outer.ProtectedNested() + Outer().ProtectedInner() Outer.PublicNested() Outer().PublicInner() diff --git a/compiler/testData/diagnostics/tests/j+k/invisiblePackagePrivateInheritedMember.fir.kt b/compiler/testData/diagnostics/tests/j+k/invisiblePackagePrivateInheritedMember.fir.kt index 4e236972154..376efd92742 100644 --- a/compiler/testData/diagnostics/tests/j+k/invisiblePackagePrivateInheritedMember.fir.kt +++ b/compiler/testData/diagnostics/tests/j+k/invisiblePackagePrivateInheritedMember.fir.kt @@ -19,5 +19,5 @@ package c import b.F fun f() { - F().m + F().m } diff --git a/compiler/testData/diagnostics/tests/j+k/packageVisibility.fir.kt b/compiler/testData/diagnostics/tests/j+k/packageVisibility.fir.kt index 7bef5db57aa..b1913801299 100644 --- a/compiler/testData/diagnostics/tests/j+k/packageVisibility.fir.kt +++ b/compiler/testData/diagnostics/tests/j+k/packageVisibility.fir.kt @@ -26,19 +26,19 @@ package b import a.MyJavaClass -val mc1 = MyJavaClass() +val mc1 = MyJavaClass() -val x = MyJavaClass.staticMethod() -val y = MyJavaClass.NestedClass.staticMethodOfNested() -val z = MyJavaClass.NestedClass() +val x = MyJavaClass.staticMethod() +val y = MyJavaClass.NestedClass.staticMethodOfNested() +val z = MyJavaClass.NestedClass() //FILE: c.kt package a.c import a.MyJavaClass -val mc1 = MyJavaClass() +val mc1 = MyJavaClass() -val x = MyJavaClass.staticMethod() -val y = MyJavaClass.NestedClass.staticMethodOfNested() -val z = MyJavaClass.NestedClass() +val x = MyJavaClass.staticMethod() +val y = MyJavaClass.NestedClass.staticMethodOfNested() +val z = MyJavaClass.NestedClass() diff --git a/compiler/testData/diagnostics/tests/j+k/sam/privateCandidatesWithWrongArguments.fir.kt b/compiler/testData/diagnostics/tests/j+k/sam/privateCandidatesWithWrongArguments.fir.kt index c339c400571..5537a9a065d 100644 --- a/compiler/testData/diagnostics/tests/j+k/sam/privateCandidatesWithWrongArguments.fir.kt +++ b/compiler/testData/diagnostics/tests/j+k/sam/privateCandidatesWithWrongArguments.fir.kt @@ -17,5 +17,5 @@ public class A { package bar fun main() { - foo.A.f {} + foo.A.f {} } diff --git a/compiler/testData/diagnostics/tests/javac/imports/PackagePrivateAndPublicNested.fir.kt b/compiler/testData/diagnostics/tests/javac/imports/PackagePrivateAndPublicNested.fir.kt index dc5b5767b04..adb9f0540ab 100644 --- a/compiler/testData/diagnostics/tests/javac/imports/PackagePrivateAndPublicNested.fir.kt +++ b/compiler/testData/diagnostics/tests/javac/imports/PackagePrivateAndPublicNested.fir.kt @@ -11,7 +11,7 @@ package a import p.Foo import p.Foo.Nested -class Bar : Foo() { +class Bar : Foo() { protected fun foo(): Nested? = null } diff --git a/compiler/testData/diagnostics/tests/multimodule/internal.fir.kt b/compiler/testData/diagnostics/tests/multimodule/internal.fir.kt index f69810ed517..acc34069258 100644 --- a/compiler/testData/diagnostics/tests/multimodule/internal.fir.kt +++ b/compiler/testData/diagnostics/tests/multimodule/internal.fir.kt @@ -22,14 +22,14 @@ internal class B import p.* fun test() { - val _a = a - val _v = v - a() - B() + val _a = a + val _v = v + a() + B() val inst = A() - val ia = inst.a - val iv = inst.v - inst.a() - inst.B() + val ia = inst.a + val iv = inst.v + inst.a() + inst.B() } diff --git a/compiler/testData/diagnostics/tests/multimodule/packagePrivate.fir.kt b/compiler/testData/diagnostics/tests/multimodule/packagePrivate.fir.kt index dcc962ea7cc..4b212755842 100644 --- a/compiler/testData/diagnostics/tests/multimodule/packagePrivate.fir.kt +++ b/compiler/testData/diagnostics/tests/multimodule/packagePrivate.fir.kt @@ -9,11 +9,11 @@ private val a = 1 package p -val b = a // same package, same module +val b = a // same package, same module // MODULE: m2(m1) // FILE: c.kt package p -val c = a // same package, another module +val c = a // same package, another module diff --git a/compiler/testData/diagnostics/tests/multimodule/publishedApiInternal.fir.kt b/compiler/testData/diagnostics/tests/multimodule/publishedApiInternal.fir.kt index 3ea44d37d47..a566d9c3fdf 100644 --- a/compiler/testData/diagnostics/tests/multimodule/publishedApiInternal.fir.kt +++ b/compiler/testData/diagnostics/tests/multimodule/publishedApiInternal.fir.kt @@ -30,27 +30,27 @@ internal class B import p.* fun test() { - val _a = a - val _v = v - a() - B() + val _a = a + val _v = v + a() + B() val inst = A() - val ia = inst.a - val iv = inst.v - inst.a() - inst.B() + val ia = inst.a + val iv = inst.v + inst.a() + inst.B() } inline fun testInline() { - val _a = a - val _v = v - a() - B() + val _a = a + val _v = v + a() + B() val inst = A() - val ia = inst.a - val iv = inst.v - inst.a() - inst.B() + val ia = inst.a + val iv = inst.v + inst.a() + inst.B() } diff --git a/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt362.fir.kt b/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt362.fir.kt index c4cbdd17d14..087cc6f092d 100644 --- a/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt362.fir.kt +++ b/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt362.fir.kt @@ -6,11 +6,11 @@ package example fun test() { val p = test.Public() if (p.public is Int) p.public + 1 - if (p.protected is Int) p.protected + 1 + if (p.protected is Int) p.protected + 1 if (p.internal is Int) p.internal + 1 val i = test.Internal() if (i.public is Int) i.public + 1 - if (i.protected is Int) i.protected + 1 + if (i.protected is Int) i.protected + 1 if (i.internal is Int) i.internal + 1 } diff --git a/compiler/testData/diagnostics/tests/privateInFile/topLevelAnnotationCall.fir.kt b/compiler/testData/diagnostics/tests/privateInFile/topLevelAnnotationCall.fir.kt index d7ce81b200c..6173a7cf742 100644 --- a/compiler/testData/diagnostics/tests/privateInFile/topLevelAnnotationCall.fir.kt +++ b/compiler/testData/diagnostics/tests/privateInFile/topLevelAnnotationCall.fir.kt @@ -17,11 +17,11 @@ class C1 // FILE: 2.kt package pp -@A(foo) +@A(foo) fun f2() {} -@A(foo) +@A(foo) val p2 = "" -@A(foo) +@A(foo) class C2 diff --git a/compiler/testData/diagnostics/tests/privateInFile/visibility.fir.kt b/compiler/testData/diagnostics/tests/privateInFile/visibility.fir.kt index 4e59123b86a..b179904c0cf 100644 --- a/compiler/testData/diagnostics/tests/privateInFile/visibility.fir.kt +++ b/compiler/testData/diagnostics/tests/privateInFile/visibility.fir.kt @@ -30,20 +30,20 @@ package a fun test() { val y = makeA() y.bar() - foo() + foo() - val u : A = A() + val u : A = A() - val z = x - x = 30 + val z = x + x = 30 - val po = PO + val po = PO val v = xx xx = 40 } -class B : A() {} +class B : A() {} class Q { class W { diff --git a/compiler/testData/diagnostics/tests/resolve/invoke/errors/invisibleInvoke.fir.kt b/compiler/testData/diagnostics/tests/resolve/invoke/errors/invisibleInvoke.fir.kt index 46c0ce68894..cd21a83e16d 100644 --- a/compiler/testData/diagnostics/tests/resolve/invoke/errors/invisibleInvoke.fir.kt +++ b/compiler/testData/diagnostics/tests/resolve/invoke/errors/invisibleInvoke.fir.kt @@ -5,6 +5,6 @@ class My { } fun My.foo(i: Int) { - i("") - 1("") + i("") + 1("") } diff --git a/compiler/testData/diagnostics/tests/resolve/noCandidates/resolvedToClassifier.fir.kt b/compiler/testData/diagnostics/tests/resolve/noCandidates/resolvedToClassifier.fir.kt index 31df993c2fa..2a51b0dbcf0 100644 --- a/compiler/testData/diagnostics/tests/resolve/noCandidates/resolvedToClassifier.fir.kt +++ b/compiler/testData/diagnostics/tests/resolve/noCandidates/resolvedToClassifier.fir.kt @@ -9,7 +9,7 @@ fun test() { val interface_as_fun = A() val interface_as_val = A - val object_as_fun = B() + val object_as_fun = B() val class_as_val = C } diff --git a/compiler/testData/diagnostics/tests/resolve/noCandidates/resolvedToClassifierWithReceiver.fir.kt b/compiler/testData/diagnostics/tests/resolve/noCandidates/resolvedToClassifierWithReceiver.fir.kt index 271c98176b8..cc9714a6c9e 100644 --- a/compiler/testData/diagnostics/tests/resolve/noCandidates/resolvedToClassifierWithReceiver.fir.kt +++ b/compiler/testData/diagnostics/tests/resolve/noCandidates/resolvedToClassifierWithReceiver.fir.kt @@ -11,7 +11,7 @@ fun testX() { val interface_as_fun = X.A() val interface_as_val = X.A - val object_as_fun = X.B() + val object_as_fun = X.B() val class_as_val = X.C } @@ -26,7 +26,7 @@ fun testY() { val interface_as_fun = Y.A() val interface_as_val = Y.A - val object_as_fun = Y.B() + val object_as_fun = Y.B() val class_as_val = Y.C } diff --git a/compiler/testData/diagnostics/tests/scopes/VisibilityInClassObject.fir.kt b/compiler/testData/diagnostics/tests/scopes/VisibilityInClassObject.fir.kt index 7251d6ec170..1408ac18fa1 100644 --- a/compiler/testData/diagnostics/tests/scopes/VisibilityInClassObject.fir.kt +++ b/compiler/testData/diagnostics/tests/scopes/VisibilityInClassObject.fir.kt @@ -19,15 +19,15 @@ open class A { fun fromOutside() { devNull(A.internal_val) devNull(A.public_val) - devNull(A.private_val) - devNull(A.protected_val) + devNull(A.private_val) + devNull(A.protected_val) } class B: A() { fun fromSubclass() { devNull(A.internal_val) devNull(A.public_val) - devNull(A.private_val) + devNull(A.private_val) devNull(A.protected_val) } } diff --git a/compiler/testData/diagnostics/tests/scopes/VisibilityInheritModifier.fir.kt b/compiler/testData/diagnostics/tests/scopes/VisibilityInheritModifier.fir.kt index 9f2f655f395..74da7ebc34e 100644 --- a/compiler/testData/diagnostics/tests/scopes/VisibilityInheritModifier.fir.kt +++ b/compiler/testData/diagnostics/tests/scopes/VisibilityInheritModifier.fir.kt @@ -35,7 +35,7 @@ class G : F() { } fun test_fun_stays_protected(g: G) { - g.protected_fun() + g.protected_fun() } //------------ diff --git a/compiler/testData/diagnostics/tests/scopes/inheritance/statics/hidePrivateByPublic.fir.kt b/compiler/testData/diagnostics/tests/scopes/inheritance/statics/hidePrivateByPublic.fir.kt index 5c153794af9..0aabcd4b6a8 100644 --- a/compiler/testData/diagnostics/tests/scopes/inheritance/statics/hidePrivateByPublic.fir.kt +++ b/compiler/testData/diagnostics/tests/scopes/inheritance/statics/hidePrivateByPublic.fir.kt @@ -23,8 +23,8 @@ class B extends A { // FILE: test.kt fun test() { - A.a - A.foo() + A.a + A.foo() A.b A.bar() B.a diff --git a/compiler/testData/diagnostics/tests/scopes/kt1244.fir.kt b/compiler/testData/diagnostics/tests/scopes/kt1244.fir.kt index 894f7089d50..39b2d25e557 100644 --- a/compiler/testData/diagnostics/tests/scopes/kt1244.fir.kt +++ b/compiler/testData/diagnostics/tests/scopes/kt1244.fir.kt @@ -8,6 +8,6 @@ class A { class B() { init { - A().a = "Hello" + A().a = "Hello" } } diff --git a/compiler/testData/diagnostics/tests/scopes/kt151.fir.kt b/compiler/testData/diagnostics/tests/scopes/kt151.fir.kt index 3c7df5a8e6e..55209c4f23c 100644 --- a/compiler/testData/diagnostics/tests/scopes/kt151.fir.kt +++ b/compiler/testData/diagnostics/tests/scopes/kt151.fir.kt @@ -10,7 +10,7 @@ class B : A() { } fun test(b: B) { - b.x() + b.x() } diff --git a/compiler/testData/diagnostics/tests/scopes/kt1738.fir.kt b/compiler/testData/diagnostics/tests/scopes/kt1738.fir.kt index 532007dca8f..81579bd1c36 100644 --- a/compiler/testData/diagnostics/tests/scopes/kt1738.fir.kt +++ b/compiler/testData/diagnostics/tests/scopes/kt1738.fir.kt @@ -6,6 +6,6 @@ class A(private var i: Int, var j: Int) { } fun test(a: A) { - a.i++ + a.i++ a.j++ } diff --git a/compiler/testData/diagnostics/tests/scopes/kt1805.fir.kt b/compiler/testData/diagnostics/tests/scopes/kt1805.fir.kt index eeeff3afa70..3549704fef2 100644 --- a/compiler/testData/diagnostics/tests/scopes/kt1805.fir.kt +++ b/compiler/testData/diagnostics/tests/scopes/kt1805.fir.kt @@ -7,14 +7,14 @@ open class Some { class SomeSubclass : Some() { fun test() { - this.privateField // 1. Unresolved reference + this.privateField // 1. Unresolved reference } } fun test() { val s2 = Some() - s2.privateField // 2. Can't access to 'privateField' in Some + s2.privateField // 2. Can't access to 'privateField' in Some val s1 = SomeSubclass() - s1.privateField // 3. Unresolved reference + s1.privateField // 3. Unresolved reference } diff --git a/compiler/testData/diagnostics/tests/scopes/kt1806.fir.kt b/compiler/testData/diagnostics/tests/scopes/kt1806.fir.kt index 7255217b584..110b68f5c98 100644 --- a/compiler/testData/diagnostics/tests/scopes/kt1806.fir.kt +++ b/compiler/testData/diagnostics/tests/scopes/kt1806.fir.kt @@ -8,7 +8,7 @@ object MyObject { fun test1() { - doSmth(MyObject.message) + doSmth(MyObject.message) } class Test { @@ -17,7 +17,7 @@ class Test { } fun test2() { - doSmth(MyObject1.message) + doSmth(MyObject1.message) } } diff --git a/compiler/testData/diagnostics/tests/scopes/kt1942.fir.kt b/compiler/testData/diagnostics/tests/scopes/kt1942.fir.kt index e10c04b6470..c39a5c516a0 100644 --- a/compiler/testData/diagnostics/tests/scopes/kt1942.fir.kt +++ b/compiler/testData/diagnostics/tests/scopes/kt1942.fir.kt @@ -14,6 +14,6 @@ import a.C class A : C() { fun test() { - val v = myValue + val v = myValue } } diff --git a/compiler/testData/diagnostics/tests/scopes/kt37.fir.kt b/compiler/testData/diagnostics/tests/scopes/kt37.fir.kt index 1d8fe8aa0f9..74f14155ed3 100644 --- a/compiler/testData/diagnostics/tests/scopes/kt37.fir.kt +++ b/compiler/testData/diagnostics/tests/scopes/kt37.fir.kt @@ -11,6 +11,6 @@ class C() { fun box(): String { val c = C() - if (c.f != 610) return "fail" + if (c.f != 610) return "fail" return "OK" } diff --git a/compiler/testData/diagnostics/tests/scopes/kt9430.fir.kt b/compiler/testData/diagnostics/tests/scopes/kt9430.fir.kt index fae56d55844..dc6cae66ada 100644 --- a/compiler/testData/diagnostics/tests/scopes/kt9430.fir.kt +++ b/compiler/testData/diagnostics/tests/scopes/kt9430.fir.kt @@ -12,5 +12,5 @@ class C: A() { } class D { - fun qux() { B().foo() } + fun qux() { B().foo() } } diff --git a/compiler/testData/diagnostics/tests/scopes/protectedVisibility/innerProtectedClass.fir.kt b/compiler/testData/diagnostics/tests/scopes/protectedVisibility/innerProtectedClass.fir.kt index c4704df078f..d87dae3ec9d 100644 --- a/compiler/testData/diagnostics/tests/scopes/protectedVisibility/innerProtectedClass.fir.kt +++ b/compiler/testData/diagnostics/tests/scopes/protectedVisibility/innerProtectedClass.fir.kt @@ -8,6 +8,6 @@ class Foo : BaseClass() { fun bar() { val f = foo() f.x - f.y + f.y } } diff --git a/compiler/testData/diagnostics/tests/scopes/protectedVisibility/javaInheritedInKotlin.fir.kt b/compiler/testData/diagnostics/tests/scopes/protectedVisibility/javaInheritedInKotlin.fir.kt index 0a9c5f8b3b7..e21198dcd22 100644 --- a/compiler/testData/diagnostics/tests/scopes/protectedVisibility/javaInheritedInKotlin.fir.kt +++ b/compiler/testData/diagnostics/tests/scopes/protectedVisibility/javaInheritedInKotlin.fir.kt @@ -39,20 +39,20 @@ class KotlinClass2 : JavaClass() { } fun test(a: KotlinClass, b: KotlinClass2) { - a.foo() // Error, protected_and_package declared in different package - b.foo() // Error, protected visibility in same package (but could be protected_and_package) + a.foo() // Error, protected_and_package declared in different package + b.foo() // Error, protected visibility in same package (but could be protected_and_package) - a.field + a.field - JavaClass.bar1() - JavaClass.CONST1 + JavaClass.bar1() + JavaClass.CONST1 KotlinClass.bar1() // Currently it's unresolved, but it should be prohibited even in case it would be resolved KotlinClass.CONST1 - JavaClassSamePackage.bar1() + JavaClassSamePackage.bar1() JavaClassSamePackage.bar2() - JavaClassSamePackage.CONST1 + JavaClassSamePackage.CONST1 JavaClassSamePackage.CONST2 } diff --git a/compiler/testData/diagnostics/tests/scopes/protectedVisibility/protectedCallOnSubClass.fir.kt b/compiler/testData/diagnostics/tests/scopes/protectedVisibility/protectedCallOnSubClass.fir.kt index 7cb4268c107..53e100041b4 100644 --- a/compiler/testData/diagnostics/tests/scopes/protectedVisibility/protectedCallOnSubClass.fir.kt +++ b/compiler/testData/diagnostics/tests/scopes/protectedVisibility/protectedCallOnSubClass.fir.kt @@ -4,8 +4,8 @@ open class A { fun bar(x: B) { x.foo() // OK, foo declared in A - x.baz() // Declared in B - x.foobaz() // Declared in B + x.baz() // Declared in B + x.foobaz() // Declared in B } } diff --git a/compiler/testData/diagnostics/tests/scopes/protectedVisibility/syntheticPropertyExtensions.fir.kt b/compiler/testData/diagnostics/tests/scopes/protectedVisibility/syntheticPropertyExtensions.fir.kt index f3a96b5818a..aab40362af0 100644 --- a/compiler/testData/diagnostics/tests/scopes/protectedVisibility/syntheticPropertyExtensions.fir.kt +++ b/compiler/testData/diagnostics/tests/scopes/protectedVisibility/syntheticPropertyExtensions.fir.kt @@ -40,6 +40,6 @@ class B : A() { } fun baz(a: A) { - a.foo + a.foo a.bar = a.bar + "" } diff --git a/compiler/testData/diagnostics/tests/scopes/protectedVisibility/syntheticSAMExtensions.fir.kt b/compiler/testData/diagnostics/tests/scopes/protectedVisibility/syntheticSAMExtensions.fir.kt index 71d79553922..3eb7d22c743 100644 --- a/compiler/testData/diagnostics/tests/scopes/protectedVisibility/syntheticSAMExtensions.fir.kt +++ b/compiler/testData/diagnostics/tests/scopes/protectedVisibility/syntheticSAMExtensions.fir.kt @@ -27,5 +27,5 @@ class B : A() { } fun baz(a: A) { - a.foo { } + a.foo { } } diff --git a/compiler/testData/diagnostics/tests/scopes/visibility.fir.kt b/compiler/testData/diagnostics/tests/scopes/visibility.fir.kt index 4f5423b32c8..6db9b2fd4eb 100644 --- a/compiler/testData/diagnostics/tests/scopes/visibility.fir.kt +++ b/compiler/testData/diagnostics/tests/scopes/visibility.fir.kt @@ -40,8 +40,8 @@ class B { } fun test3(a: A) { - a.v //todo .bMethod() - a.f(0, 1) //todo .bMethod() + a.v //todo .bMethod() + a.f(0, 1) //todo .bMethod() } interface T @@ -54,7 +54,7 @@ open class C : T { } fun test4(c: C) { - c.i++ + c.i++ } class D : C() { @@ -78,7 +78,7 @@ class F : C() { class G : T { fun test8(c: C) { - doSmth(c.i) + doSmth(c.i) } } @@ -91,5 +91,5 @@ import test_visibility.* fun test() { internal_fun() - private_fun() + private_fun() } diff --git a/compiler/testData/diagnostics/tests/scopes/visibility2.fir.kt b/compiler/testData/diagnostics/tests/scopes/visibility2.fir.kt index ab6af500ded..bfca858b9ef 100644 --- a/compiler/testData/diagnostics/tests/scopes/visibility2.fir.kt +++ b/compiler/testData/diagnostics/tests/scopes/visibility2.fir.kt @@ -25,15 +25,15 @@ import a.PO fun test() { val y = makeA() y.bar() - foo() + foo() - val u : A = A() + val u : A = A() val a : java.util.Arrays.ArrayList; - val po = PO + val po = PO } -class B : A() {} +class B : A() {} class Q { class W { diff --git a/compiler/testData/diagnostics/tests/scopes/visibility3.fir.kt b/compiler/testData/diagnostics/tests/scopes/visibility3.fir.kt index 0834d3c5320..08103fdd276 100644 --- a/compiler/testData/diagnostics/tests/scopes/visibility3.fir.kt +++ b/compiler/testData/diagnostics/tests/scopes/visibility3.fir.kt @@ -26,17 +26,17 @@ package a fun test() { val y = makeA() y.bar() - foo() + foo() - val u : A = A() + val u : A = A() - val z = x - x = 30 + val z = x + x = 30 - val po = PO + val po = PO } -class B : A() {} +class B : A() {} class Q { class W { diff --git a/compiler/testData/diagnostics/tests/secondaryConstructors/errorsOnEmptyDelegationCall.fir.kt b/compiler/testData/diagnostics/tests/secondaryConstructors/errorsOnEmptyDelegationCall.fir.kt index 6b195862cf1..86b6d6ad5ea 100644 --- a/compiler/testData/diagnostics/tests/secondaryConstructors/errorsOnEmptyDelegationCall.fir.kt +++ b/compiler/testData/diagnostics/tests/secondaryConstructors/errorsOnEmptyDelegationCall.fir.kt @@ -38,5 +38,5 @@ open class B3 { class A3 : B3 { constructor() - constructor(x: Int) : super() + constructor(x: Int) : super() } diff --git a/compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/OnlyPublic.fir.kt b/compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/OnlyPublic.fir.kt index bf8a70fca07..12b86439d5d 100644 --- a/compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/OnlyPublic.fir.kt +++ b/compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/OnlyPublic.fir.kt @@ -5,9 +5,9 @@ import JavaClass fun foo(javaClass: JavaClass) { javaClass.somethingPublic - javaClass.somethingProtected - javaClass.somethingPrivate - javaClass.somethingPackage + javaClass.somethingProtected + javaClass.somethingPrivate + javaClass.somethingPackage javaClass.somethingPublic = 1 } diff --git a/compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/SetterHasHigherAccess.fir.kt b/compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/SetterHasHigherAccess.fir.kt index 44f2393036a..aa794ecb83e 100644 --- a/compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/SetterHasHigherAccess.fir.kt +++ b/compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/SetterHasHigherAccess.fir.kt @@ -4,9 +4,9 @@ package k import JavaClass fun foo(javaClass: JavaClass) { - val v = javaClass.something - javaClass.something = 1 - javaClass.something++ + val v = javaClass.something + javaClass.something = 1 + javaClass.something++ } // FILE: JavaClass.java diff --git a/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/PackageLocal.fir.kt b/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/PackageLocal.fir.kt index 2a943c92954..09551f68f76 100644 --- a/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/PackageLocal.fir.kt +++ b/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/PackageLocal.fir.kt @@ -4,7 +4,7 @@ package k import JavaClass fun foo(javaClass: JavaClass) { - javaClass.doSomething { } + javaClass.doSomething { } } // FILE: KotlinFile2.kt diff --git a/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/Private.fir.kt b/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/Private.fir.kt index d9eb9e0a332..96af786732e 100644 --- a/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/Private.fir.kt +++ b/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/Private.fir.kt @@ -1,7 +1,7 @@ // !WITH_NEW_INFERENCE // FILE: KotlinFile.kt fun foo(javaClass: JavaClass) { - javaClass.doSomething { } + javaClass.doSomething { } } // FILE: JavaClass.java diff --git a/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/Protected.fir.kt b/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/Protected.fir.kt index 65f214569b2..c6fff226bdc 100644 --- a/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/Protected.fir.kt +++ b/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/Protected.fir.kt @@ -4,7 +4,7 @@ package k import JavaClass fun foo(javaClass: JavaClass) { - javaClass.doSomething { + javaClass.doSomething { bar() } } diff --git a/compiler/testData/diagnostics/tests/typealias/privateInFile.fir.kt b/compiler/testData/diagnostics/tests/typealias/privateInFile.fir.kt index c61088d8286..8de3f1bbecb 100644 --- a/compiler/testData/diagnostics/tests/typealias/privateInFile.fir.kt +++ b/compiler/testData/diagnostics/tests/typealias/privateInFile.fir.kt @@ -5,7 +5,7 @@ private class C { private typealias TA = C -private val test1: C = C() +private val test1: C = C() private val test1co: C.Companion = C private val test2: TA = TA() diff --git a/compiler/testData/diagnostics/tests/typealias/typeAliasConstructor.fir.kt b/compiler/testData/diagnostics/tests/typealias/typeAliasConstructor.fir.kt index 55a68b65027..74af33068f9 100644 --- a/compiler/testData/diagnostics/tests/typealias/typeAliasConstructor.fir.kt +++ b/compiler/testData/diagnostics/tests/typealias/typeAliasConstructor.fir.kt @@ -20,5 +20,5 @@ typealias TO = AnObject val test6 = TI() val test6a = Interface() -val test7 = TO() -val test7a = AnObject() +val test7 = TO() +val test7a = AnObject() diff --git a/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorWrongClass.fir.kt b/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorWrongClass.fir.kt index 10b76eeffe5..e95173e0a38 100644 --- a/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorWrongClass.fir.kt +++ b/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorWrongClass.fir.kt @@ -12,13 +12,13 @@ val test2a = AnnotationClass() enum class EnumClass { VALUE1, VALUE2 } typealias Test3 = EnumClass -val test3 = Test3() -val test3a = EnumClass() +val test3 = Test3() +val test3a = EnumClass() sealed class SealedClass typealias Test4 = SealedClass -val test4 = Test4() -val test4a = SealedClass() +val test4 = Test4() +val test4a = SealedClass() class Outer { inner class Inner diff --git a/compiler/testData/diagnostics/tests/unsignedTypes/callDefaultConstructorOfUnsignedType.fir.kt b/compiler/testData/diagnostics/tests/unsignedTypes/callDefaultConstructorOfUnsignedType.fir.kt index 761b6af164b..78a88c6baae 100644 --- a/compiler/testData/diagnostics/tests/unsignedTypes/callDefaultConstructorOfUnsignedType.fir.kt +++ b/compiler/testData/diagnostics/tests/unsignedTypes/callDefaultConstructorOfUnsignedType.fir.kt @@ -1 +1 @@ -val foo = UInt() +val foo = UInt() diff --git a/compiler/testData/diagnostics/tests/variance/privateToThis/FunctionCall.fir.kt b/compiler/testData/diagnostics/tests/variance/privateToThis/FunctionCall.fir.kt index 8204ad96c10..596158fe1c6 100644 --- a/compiler/testData/diagnostics/tests/variance/privateToThis/FunctionCall.fir.kt +++ b/compiler/testData/diagnostics/tests/variance/privateToThis/FunctionCall.fir.kt @@ -33,5 +33,5 @@ class Test { } fun test(t: Test) { - t.apply(t.foo()) + t.apply(t.foo()) } diff --git a/compiler/testData/diagnostics/tests/variance/privateToThis/GetVal.fir.kt b/compiler/testData/diagnostics/tests/variance/privateToThis/GetVal.fir.kt index 43bb82c1c0b..41e4388514b 100644 --- a/compiler/testData/diagnostics/tests/variance/privateToThis/GetVal.fir.kt +++ b/compiler/testData/diagnostics/tests/variance/privateToThis/GetVal.fir.kt @@ -33,5 +33,5 @@ class Test { } fun test(t: Test) { - t.apply(t.i) + t.apply(t.i) } diff --git a/compiler/testData/diagnostics/tests/variance/privateToThis/SetVar.fir.kt b/compiler/testData/diagnostics/tests/variance/privateToThis/SetVar.fir.kt index 27fc45a1594..2e60cdab406 100644 --- a/compiler/testData/diagnostics/tests/variance/privateToThis/SetVar.fir.kt +++ b/compiler/testData/diagnostics/tests/variance/privateToThis/SetVar.fir.kt @@ -33,5 +33,5 @@ class Test { } fun test(t: Test) { - t.i = getT() + t.i = getT() } diff --git a/compiler/testData/diagnostics/testsWithStdLib/CallCompanionProtectedNonStatic.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/CallCompanionProtectedNonStatic.fir.kt index 794cd08d94b..17f6cac2902 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/CallCompanionProtectedNonStatic.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/CallCompanionProtectedNonStatic.fir.kt @@ -74,20 +74,20 @@ class Derived : Base() { class Other { fun test(base: Base, derived: Derived) { - base.foo() + base.foo() base.gav() base.bar() - derived.foo() + derived.foo() derived.gav() derived.bar() } } fun top(base: Base, derived: Derived) { - base.foo() + base.foo() base.bar() base.gav() - derived.foo() + derived.foo() derived.bar() derived.gav() } diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmPackageName/incorrectJvmPackageName.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmPackageName/incorrectJvmPackageName.fir.kt index cc3cdfacdc1..12ce9ee1123 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmPackageName/incorrectJvmPackageName.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmPackageName/incorrectJvmPackageName.fir.kt @@ -1,27 +1,27 @@ // !DIAGNOSTICS: -INVISIBLE_MEMBER -INVISIBLE_REFERENCE // FILE: b.kt -@file:JvmPackageName("") +@file:JvmPackageName("") package b fun b() {} // FILE: c.kt -@file:JvmPackageName("invalid-fq-name") +@file:JvmPackageName("invalid-fq-name") package c fun c() {} // FILE: d.kt -@file:JvmPackageName("d") +@file:JvmPackageName("d") package d class D fun d() {} // FILE: e.kt -@file:JvmPackageName(42) +@file:JvmPackageName(42) package e fun e() {} // FILE: f.kt -@file:JvmPackageName(f) +@file:JvmPackageName(f) package f const val name = "f" diff --git a/compiler/testData/diagnostics/testsWithStdLib/experimental/wasExperimental.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/experimental/wasExperimental.fir.kt index 671a8582a04..97b827d82f5 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/experimental/wasExperimental.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/experimental/wasExperimental.fir.kt @@ -10,19 +10,19 @@ fun newPublishedFun() {} annotation class Marker @SinceKotlin("1.4") -@WasExperimental(Marker::class) +@WasExperimental(Marker::class) fun newFunExperimentalInThePast() {} @SinceKotlin("1.4") -@WasExperimental(Marker::class) +@WasExperimental(Marker::class) val newValExperimentalInThePast = "" @SinceKotlin("1.4") -@WasExperimental(Marker::class) +@WasExperimental(Marker::class) class NewClassExperimentalInThePast @SinceKotlin("1.4") -@WasExperimental(Marker::class) +@WasExperimental(Marker::class) typealias TypeAliasToNewClass = NewClassExperimentalInThePast diff --git a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/checkLowPriorityIsResolvedSuccessfully.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/checkLowPriorityIsResolvedSuccessfully.fir.kt deleted file mode 100644 index 6458d2f9600..00000000000 --- a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/checkLowPriorityIsResolvedSuccessfully.fir.kt +++ /dev/null @@ -1,15 +0,0 @@ -class Foo { - @Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") - @kotlin.internal.LowPriorityInOverloadResolution - val test: Bar = Bar() -} - -fun Foo.test() {} -class Bar -class Scope { - operator fun Bar.invoke(f: () -> Unit) {} -} - -fun Scope.bar(e: Foo) { - e.test {} -} diff --git a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/checkLowPriorityIsResolvedSuccessfully.kt b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/checkLowPriorityIsResolvedSuccessfully.kt index 8447667a390..e0693a2dceb 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/checkLowPriorityIsResolvedSuccessfully.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/checkLowPriorityIsResolvedSuccessfully.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL class Foo { @Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") @kotlin.internal.LowPriorityInOverloadResolution diff --git a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/exactAnnotationWithUpperBoundConstraint.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/exactAnnotationWithUpperBoundConstraint.fir.kt index 1258e86b774..cab02982e66 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/exactAnnotationWithUpperBoundConstraint.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/exactAnnotationWithUpperBoundConstraint.fir.kt @@ -1,7 +1,7 @@ // !DIAGNOSTICS: -UNUSED_PARAMETER -DEBUG_INFO_CONSTANT -UNUSED_EXPRESSION @Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") -fun <@kotlin.internal.OnlyInputTypes K, V, V1 : V?> +fun <@kotlin.internal.OnlyInputTypes K, V, V1 : V?> Map.getOrDefault_Exact(key: K, defaultValue: V1): V1 = TODO() fun test() { diff --git a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/explicitTypeArgumentAsValidInputType.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/explicitTypeArgumentAsValidInputType.fir.kt index c43b914ba5b..25ce8b26d85 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/explicitTypeArgumentAsValidInputType.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/explicitTypeArgumentAsValidInputType.fir.kt @@ -4,7 +4,7 @@ interface Parent object ChildA : Parent object ChildB : Parent -fun <@kotlin.internal.OnlyInputTypes T> select(a: T, b: T) {} +fun <@kotlin.internal.OnlyInputTypes T> select(a: T, b: T) {} fun test() { select(ChildA, ChildB) // should be error diff --git a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/internalAnnotationsOnTypes.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/internalAnnotationsOnTypes.fir.kt deleted file mode 100644 index a2b51bc98b2..00000000000 --- a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/internalAnnotationsOnTypes.fir.kt +++ /dev/null @@ -1,30 +0,0 @@ -//!DIAGNOSTICS: -UNUSED_PARAMETER - -@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") -fun Iterable<*>.filterIsInstance1(): List<@kotlin.internal.NoInfer R> = throw Exception() - -@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") -fun List<*>.filterIsInstance2(): @kotlin.internal.NoInfer List = throw Exception() - -fun test(list: List) { - list.filterIsInstance1().map { it * 2 } - list.filterIsInstance2().filter { it > 10 } -} - -@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") -fun foo(t: R): List<@kotlin.internal.NoInfer R> = throw Exception("$t") - -fun test() { - foo(1).map { it * 2 } -} - -@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") -fun List.foo(): @kotlin.internal.NoInfer R = throw Exception() - -@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") -fun bar(r: R, f: Function1<@kotlin.internal.NoInfer R, Unit>): Nothing = throw Exception() - -fun test1() { - listOf("").foo().length - bar(1) { x -> x + 1 } -} diff --git a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/internalAnnotationsOnTypes.kt b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/internalAnnotationsOnTypes.kt index 589abfaac12..bd9f7f96c57 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/internalAnnotationsOnTypes.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/internalAnnotationsOnTypes.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL //!DIAGNOSTICS: -UNUSED_PARAMETER @Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") diff --git a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/kt26698.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/kt26698.fir.kt index 9f21f112c23..059ea17eff5 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/kt26698.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/kt26698.fir.kt @@ -6,13 +6,13 @@ class CX : Base() class CY : Base() @Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") -fun <@kotlin.internal.OnlyInputTypes T> foo(a: T, b: T) {} +fun <@kotlin.internal.OnlyInputTypes T> foo(a: T, b: T) {} @Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") -fun <@kotlin.internal.OnlyInputTypes T : Any> fooA(a: T, b: T) {} +fun <@kotlin.internal.OnlyInputTypes T : Any> fooA(a: T, b: T) {} @Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") -fun <@kotlin.internal.OnlyInputTypes T : Base> fooB(a: T, b: T) {} +fun <@kotlin.internal.OnlyInputTypes T : Base> fooB(a: T, b: T) {} fun usage(x: CX, y: CY) { diff --git a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/kt35210.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/kt35210.fir.kt deleted file mode 100644 index 12f5b36ec17..00000000000 --- a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/kt35210.fir.kt +++ /dev/null @@ -1,12 +0,0 @@ -// !LANGUAGE: +NewInference -// !DIAGNOSTICS: -UNUSED_PARAMETER - -@file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") - -annotation class Anno - -fun test(a: List>) { - strictSelect(a, emptyList().map { it.annotationClass.java }) -} - -fun <@kotlin.internal.OnlyInputTypes S> strictSelect(arg1: S, arg2: S): S = TODO() diff --git a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/kt35210.kt b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/kt35210.kt index 21384611c0a..81c71ba8c30 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/kt35210.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/kt35210.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // !LANGUAGE: +NewInference // !DIAGNOSTICS: -UNUSED_PARAMETER diff --git a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/noInferAndLowPriority.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/noInferAndLowPriority.fir.kt index e871f7f9a22..ee14da52595 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/noInferAndLowPriority.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/noInferAndLowPriority.fir.kt @@ -3,11 +3,11 @@ @Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") @kotlin.jvm.JvmName("containsAny") -@kotlin.internal.LowPriorityInOverloadResolution +@kotlin.internal.LowPriorityInOverloadResolution public fun Iterable.contains1(element: T): Int = null!! @Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") -public fun Iterable.contains1(element: @kotlin.internal.NoInfer T): Boolean = null!! +public fun Iterable.contains1(element: @kotlin.internal.NoInfer T): Boolean = null!! fun test() { diff --git a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/noInferAnnotation.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/noInferAnnotation.fir.kt index 23127817482..e1de728cd58 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/noInferAnnotation.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/noInferAnnotation.fir.kt @@ -2,13 +2,13 @@ // !WITH_NEW_INFERENCE @Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") -fun test1(t1: T, t2: @kotlin.internal.NoInfer T): T = t1 +fun test1(t1: T, t2: @kotlin.internal.NoInfer T): T = t1 @Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") -fun @kotlin.internal.NoInfer T.test2(t1: T): T = t1 +fun @kotlin.internal.NoInfer T.test2(t1: T): T = t1 @Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") -fun test3(t1: @kotlin.internal.NoInfer T): T = t1 +fun test3(t1: @kotlin.internal.NoInfer T): T = t1 fun usage() { test1(1, "312") @@ -17,7 +17,7 @@ fun usage() { } @Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") -fun List.contains1(e: @kotlin.internal.NoInfer T): Boolean = true +fun List.contains1(e: @kotlin.internal.NoInfer T): Boolean = true fun test(i: Int?, a: Any, l: List) { l.contains1(a) @@ -26,7 +26,7 @@ fun test(i: Int?, a: Any, l: List) { } @Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") -fun assertEquals1(e1: T, e2: @kotlin.internal.NoInfer T): Boolean = true +fun assertEquals1(e1: T, e2: @kotlin.internal.NoInfer T): Boolean = true fun test(s: String) { assertEquals1(s, 11) diff --git a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypeAndJava.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypeAndJava.fir.kt deleted file mode 100644 index 5566febce69..00000000000 --- a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypeAndJava.fir.kt +++ /dev/null @@ -1,18 +0,0 @@ -// !LANGUAGE: +NewInference -// !DIAGNOSTICS: -UNUSED_PARAMETER - -// FILE: TestBase.java - -public class TestBase { } - -// FILE: Test.java - -public class Test extends TestBase { } - -// FILE: main.kt - -@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") -fun <@kotlin.internal.OnlyInputTypes K> TestBase.foo(key: K) = null -fun foo(result: Test<*>) { - result.foo("sd") // Type inference failed (NI), OK in OI -} diff --git a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypeAndJava.kt b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypeAndJava.kt index 9885741ed5f..78de9c07579 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypeAndJava.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypeAndJava.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // !LANGUAGE: +NewInference // !DIAGNOSTICS: -UNUSED_PARAMETER diff --git a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypeRecursiveBoundAndProjections.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypeRecursiveBoundAndProjections.fir.kt deleted file mode 100644 index 60daaa84ff5..00000000000 --- a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypeRecursiveBoundAndProjections.fir.kt +++ /dev/null @@ -1,24 +0,0 @@ -// !DIAGNOSTICS: -UNUSED_PARAMETER - -@file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") - -interface IFace - -fun <@kotlin.internal.OnlyInputTypes K, V> IFace.get(key: K): V? = TODO() -fun <@kotlin.internal.OnlyInputTypes I> id(arg: I): I = arg - -interface InvBase -class DerivedInv : InvBase -class InvRecursive> - -fun test1(argument: InvRecursive<*>, receiver: IFace, Any>) { - receiver.get(argument) -} - -fun test2(arg: InvRecursive) { - id(arg) -} - -fun test3(arg: InvRecursive) { - id(arg) -} diff --git a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypeRecursiveBoundAndProjections.kt b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypeRecursiveBoundAndProjections.kt index fcad07fe37a..df166ba2065 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypeRecursiveBoundAndProjections.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypeRecursiveBoundAndProjections.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // !DIAGNOSTICS: -UNUSED_PARAMETER @file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") diff --git a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypes.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypes.fir.kt index 7419fb23089..b72dfbd7e0d 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypes.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypes.fir.kt @@ -2,7 +2,7 @@ // !WITH_NEW_INFERENCE @Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") -public fun <@kotlin.internal.OnlyInputTypes T> Iterable.contains1(element: T): Boolean = null!! +public fun <@kotlin.internal.OnlyInputTypes T> Iterable.contains1(element: T): Boolean = null!! class In diff --git a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypesAndLowPriority.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypesAndLowPriority.fir.kt index dd639f20b89..22c49051968 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypesAndLowPriority.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypesAndLowPriority.fir.kt @@ -3,19 +3,19 @@ @Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") @kotlin.jvm.JvmName("containsAny") -@kotlin.internal.LowPriorityInOverloadResolution +@kotlin.internal.LowPriorityInOverloadResolution public fun Iterable.contains1(element: T): Int = null!! @Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") -public fun <@kotlin.internal.OnlyInputTypes T> Iterable.contains1(element: T): Boolean = null!! +public fun <@kotlin.internal.OnlyInputTypes T> Iterable.contains1(element: T): Boolean = null!! @Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") @JvmName("getAny") -@kotlin.internal.LowPriorityInOverloadResolution +@kotlin.internal.LowPriorityInOverloadResolution public fun Map.get1(key: Any?): Int = null!! @Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") -public fun <@kotlin.internal.OnlyInputTypes K, V> Map.get1(key: K): V? = null!! +public fun <@kotlin.internal.OnlyInputTypes K, V> Map.get1(key: K): V? = null!! fun test(map: Map) { val a: Int = listOf(1).contains1("") diff --git a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypesAndTopLevelCapturedTypes.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypesAndTopLevelCapturedTypes.fir.kt index c692170151f..5fe3d54488e 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypesAndTopLevelCapturedTypes.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypesAndTopLevelCapturedTypes.fir.kt @@ -4,13 +4,13 @@ class Inv @Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") -fun <@kotlin.internal.OnlyInputTypes K> Inv.onlyOut(e: K) {} +fun <@kotlin.internal.OnlyInputTypes K> Inv.onlyOut(e: K) {} @Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") -fun <@kotlin.internal.OnlyInputTypes K : Number> Inv.onlyOutUB(e: K) {} +fun <@kotlin.internal.OnlyInputTypes K : Number> Inv.onlyOutUB(e: K) {} @Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") -fun <@kotlin.internal.OnlyInputTypes K> Inv.onlyIn(e: K) {} +fun <@kotlin.internal.OnlyInputTypes K> Inv.onlyIn(e: K) {} fun test( invStar: Inv<*>, diff --git a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypesAnnotationWithPlatformTypes.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypesAnnotationWithPlatformTypes.fir.kt deleted file mode 100644 index 97ffba5e302..00000000000 --- a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypesAnnotationWithPlatformTypes.fir.kt +++ /dev/null @@ -1,19 +0,0 @@ -//!DIAGNOSTICS: -UNUSED_PARAMETER - -//FILE:Foo.java - -public class Foo { - public static String foo() { - return null; - } -} - -//FILE:Bar.kt - -@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") -fun <@kotlin.internal.OnlyInputTypes T> assertEquals1(t1: T, t2: T) {} - -fun test() { - assertEquals1(null, Foo.foo()) - assertEquals1("", Foo.foo()) -} diff --git a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypesAnnotationWithPlatformTypes.kt b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypesAnnotationWithPlatformTypes.kt index 6e534cfe513..5d4881aaafd 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypesAnnotationWithPlatformTypes.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypesAnnotationWithPlatformTypes.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL //!DIAGNOSTICS: -UNUSED_PARAMETER //FILE:Foo.java diff --git a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypesCaptured.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypesCaptured.fir.kt index e604433ef51..a75fd93f946 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypesCaptured.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypesCaptured.fir.kt @@ -3,10 +3,10 @@ // Issue: KT-26698 @Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") -public fun <@kotlin.internal.OnlyInputTypes T> Iterable.contains1(element: T): Boolean = null!! +public fun <@kotlin.internal.OnlyInputTypes T> Iterable.contains1(element: T): Boolean = null!! @Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") -public fun <@kotlin.internal.OnlyInputTypes T> Iterable.foo(element: T): T = null!! +public fun <@kotlin.internal.OnlyInputTypes T> Iterable.foo(element: T): T = null!! class Inv class Inv2 diff --git a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypesCommonConstraintSystem.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypesCommonConstraintSystem.fir.kt index cfc561a8fd0..8c323891011 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypesCommonConstraintSystem.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypesCommonConstraintSystem.fir.kt @@ -15,8 +15,8 @@ class InB(v: C) class Out(val v: O) class OutB(val v: O) -fun <@OnlyInputTypes M> strictId(arg: M): M = arg -fun <@OnlyInputTypes S> strictSelect(arg1: S, arg2: S): S = arg1 +fun <@OnlyInputTypes M> strictId(arg: M): M = arg +fun <@OnlyInputTypes S> strictSelect(arg1: S, arg2: S): S = arg1 fun testOK(first: First, bound: Bound, second: Second) { strictId(Inv(15)) diff --git a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypesUpperBound.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypesUpperBound.fir.kt index 3badc12f5d1..2de3099b37c 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypesUpperBound.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypesUpperBound.fir.kt @@ -9,4 +9,4 @@ fun foo(i: Inv, o: Out) { bar(i, o) } -fun <@kotlin.internal.OnlyInputTypes K> bar(r: Inv, o: Out): K = TODO() +fun <@kotlin.internal.OnlyInputTypes K> bar(r: Inv, o: Out): K = TODO() diff --git a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypesWarning.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypesWarning.fir.kt index 0470d75b23b..ce6cd662ea2 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypesWarning.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypesWarning.fir.kt @@ -2,7 +2,7 @@ // !DIAGNOSTICS: -UNUSED_PARAMETER @Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") -fun <@kotlin.internal.OnlyInputTypes S> select(a1: S, a2: S): S = TODO() +fun <@kotlin.internal.OnlyInputTypes S> select(a1: S, a2: S): S = TODO() interface Common class First : Common diff --git a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/resolveWithOnlyInputTypesAnnotation.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/resolveWithOnlyInputTypesAnnotation.fir.kt index e81c26f8c11..2e80f60a8f4 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/resolveWithOnlyInputTypesAnnotation.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/resolveWithOnlyInputTypesAnnotation.fir.kt @@ -2,7 +2,7 @@ // !WITH_NEW_INFERENCE @Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") -fun <@kotlin.internal.OnlyInputTypes T> assertEquals1(t1: T, t2: T) {} +fun <@kotlin.internal.OnlyInputTypes T> assertEquals1(t1: T, t2: T) {} open class A class B: A() @@ -18,7 +18,7 @@ fun test1(a: A, b: B, c: C) { } @Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") -public fun <@kotlin.internal.OnlyInputTypes T> expect1(expected: T, block: () -> T) {} +public fun <@kotlin.internal.OnlyInputTypes T> expect1(expected: T, block: () -> T) {} fun test() { expect1(2) { byteArrayOf(1, 2, 3).indexOf(3) } diff --git a/compiler/testData/diagnostics/testsWithStdLib/inline/inlineOnlySuppressesNothingToInline.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/inline/inlineOnlySuppressesNothingToInline.fir.kt deleted file mode 100644 index 2e7662ec2fe..00000000000 --- a/compiler/testData/diagnostics/testsWithStdLib/inline/inlineOnlySuppressesNothingToInline.fir.kt +++ /dev/null @@ -1,31 +0,0 @@ -// !DIAGNOSTICS: -INVISIBLE_MEMBER -INVISIBLE_REFERENCE -UNUSED_PARAMETER -NULLABLE_INLINE_PARAMETER - -@kotlin.internal.InlineOnly -inline fun test() { - -} - -@kotlin.internal.InlineOnly -inline fun test3(noinline s : (Int) -> Int) { - -} - -@kotlin.internal.InlineOnly -inline fun test4(noinline s : Int.() -> Int) { - -} - -@kotlin.internal.InlineOnly -inline fun Function1?.test5() { - -} - -@kotlin.internal.InlineOnly -inline fun Function1?.test6() { - -} - -@kotlin.internal.InlineOnly -inline fun test2(s : ((Int) -> Int)?) { - -} diff --git a/compiler/testData/diagnostics/testsWithStdLib/inline/inlineOnlySuppressesNothingToInline.kt b/compiler/testData/diagnostics/testsWithStdLib/inline/inlineOnlySuppressesNothingToInline.kt index bbff0b42bd3..137ddfd507b 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/inline/inlineOnlySuppressesNothingToInline.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/inline/inlineOnlySuppressesNothingToInline.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // !DIAGNOSTICS: -INVISIBLE_MEMBER -INVISIBLE_REFERENCE -UNUSED_PARAMETER -NULLABLE_INLINE_PARAMETER @kotlin.internal.InlineOnly diff --git a/compiler/testData/diagnostics/testsWithStdLib/pureReifiable.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/pureReifiable.fir.kt deleted file mode 100644 index 2f6e572ab4d..00000000000 --- a/compiler/testData/diagnostics/testsWithStdLib/pureReifiable.fir.kt +++ /dev/null @@ -1,12 +0,0 @@ -// !DIAGNOSTICS: -UNUSED_PARAMETER - -@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") -inline fun @kotlin.internal.PureReifiable T> foo(x: T) {} - -fun test() { - foo>(listOf("")) - foo(listOf("")) - - foo>(arrayOf("")) - foo(arrayOf("")) -} diff --git a/compiler/testData/diagnostics/testsWithStdLib/pureReifiable.kt b/compiler/testData/diagnostics/testsWithStdLib/pureReifiable.kt index 648e86cbe34..203678eff51 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/pureReifiable.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/pureReifiable.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // !DIAGNOSTICS: -UNUSED_PARAMETER @Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") diff --git a/compiler/testData/diagnostics/testsWithStdLib/resolve/hidesMembers.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/resolve/hidesMembers.fir.kt index 5ceddd130b9..dfa8092a62f 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/resolve/hidesMembers.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/resolve/hidesMembers.fir.kt @@ -8,11 +8,11 @@ package b import a.A @Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") -@kotlin.internal.HidesMembers +@kotlin.internal.HidesMembers fun A.forEach(i: Int) = i @Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") -@kotlin.internal.HidesMembers +@kotlin.internal.HidesMembers fun A.forEach(s: String) {} @@ -30,11 +30,11 @@ class A { } @Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") -@kotlin.internal.HidesMembers +@kotlin.internal.HidesMembers fun A.forEach() = "" @Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") -@kotlin.internal.HidesMembers +@kotlin.internal.HidesMembers fun A.forEach(s: String) {} fun test(a: A) { diff --git a/compiler/testData/diagnostics/testsWithStdLib/resolve/hidesMembers2.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/resolve/hidesMembers2.fir.kt index 41027b555cd..b67b6649032 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/resolve/hidesMembers2.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/resolve/hidesMembers2.fir.kt @@ -8,12 +8,12 @@ class A { } @Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") -@kotlin.internal.HidesMembers +@kotlin.internal.HidesMembers fun A.forEach(i: Int) = i class B { @Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") - @kotlin.internal.HidesMembers + @kotlin.internal.HidesMembers fun A.forEach() = this@B fun test(a: A) { @@ -27,11 +27,11 @@ class B { fun test2(a: A) { @Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") - @kotlin.internal.HidesMembers + @kotlin.internal.HidesMembers fun A.forEach() = "" @Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") - @kotlin.internal.HidesMembers + @kotlin.internal.HidesMembers fun A.forEach(i: Int) = "" a.forEach() checkType { _() } diff --git a/compiler/tests-spec/testData/diagnostics/linked/declarations/classifier-declaration/class-declaration/abstract-classes/p-2/neg/1.8.fir.kt b/compiler/tests-spec/testData/diagnostics/linked/declarations/classifier-declaration/class-declaration/abstract-classes/p-2/neg/1.8.fir.kt index 311ae0b1873..4f80ea1cd4a 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/declarations/classifier-declaration/class-declaration/abstract-classes/p-2/neg/1.8.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/declarations/classifier-declaration/class-declaration/abstract-classes/p-2/neg/1.8.fir.kt @@ -40,13 +40,13 @@ abstract class AbstractClassCase1() { fun case1(){ val a = Case1() - a.priv() - a.prot() + a.priv() + a.prot() a.int() a.pub() - a.priv1 - a.prot1 + a.priv1 + a.prot1 a.int1 a.pub1 } @@ -59,13 +59,13 @@ import base.* // TESTCASE NUMBER: 2 fun case2() { val a = Case1() - a.priv() - a.prot() - a.int() + a.priv() + a.prot() + a.int() a.pub() - a.priv1 - a.prot1 - a.int1 + a.priv1 + a.prot1 + a.int1 a.pub1 } diff --git a/compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types/kotlin.nothing/p-1/neg/2.1.fir.kt b/compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types/kotlin.nothing/p-1/neg/2.1.fir.kt index bbed635db8b..d4157f10bd7 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types/kotlin.nothing/p-1/neg/2.1.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types/kotlin.nothing/p-1/neg/2.1.fir.kt @@ -6,7 +6,7 @@ class Case1(val nothing: Nothing) fun case1() { - val res = Case1(Nothing()) + val res = Case1(Nothing()) } diff --git a/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/frontend/api/fir/diagnostics/KtFirDataClassConverters.kt b/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/frontend/api/fir/diagnostics/KtFirDataClassConverters.kt index f6f5c1adf91..d4831d095b2 100644 --- a/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/frontend/api/fir/diagnostics/KtFirDataClassConverters.kt +++ b/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/frontend/api/fir/diagnostics/KtFirDataClassConverters.kt @@ -183,8 +183,8 @@ internal val KT_DIAGNOSTIC_CONVERTER = KtDiagnosticConverterBuilder.buildConvert token, ) } - add(FirErrors.HIDDEN) { firDiagnostic -> - HiddenImpl( + add(FirErrors.INVISIBLE_REFERENCE) { firDiagnostic -> + InvisibleReferenceImpl( firSymbolBuilder.buildSymbol(firDiagnostic.a.fir as FirDeclaration), firDiagnostic as FirPsiDiagnostic<*>, token, diff --git a/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/frontend/api/fir/diagnostics/KtFirDiagnostics.kt b/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/frontend/api/fir/diagnostics/KtFirDiagnostics.kt index 803ca87abfd..0c9688b0c99 100644 --- a/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/frontend/api/fir/diagnostics/KtFirDiagnostics.kt +++ b/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/frontend/api/fir/diagnostics/KtFirDiagnostics.kt @@ -148,9 +148,9 @@ sealed class KtFirDiagnostic : KtDiagnosticWithPsi { override val diagnosticClass get() = DivisionByZero::class } - abstract class Hidden : KtFirDiagnostic() { - override val diagnosticClass get() = Hidden::class - abstract val hidden: KtSymbol + abstract class InvisibleReference : KtFirDiagnostic() { + override val diagnosticClass get() = InvisibleReference::class + abstract val reference: KtSymbol } abstract class UnresolvedReference : KtFirDiagnostic() { diff --git a/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/frontend/api/fir/diagnostics/KtFirDiagnosticsImpl.kt b/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/frontend/api/fir/diagnostics/KtFirDiagnosticsImpl.kt index 582815d086f..55666d4f8e8 100644 --- a/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/frontend/api/fir/diagnostics/KtFirDiagnosticsImpl.kt +++ b/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/frontend/api/fir/diagnostics/KtFirDiagnosticsImpl.kt @@ -212,11 +212,11 @@ internal class DivisionByZeroImpl( override val firDiagnostic: FirPsiDiagnostic<*> by weakRef(firDiagnostic) } -internal class HiddenImpl( - override val hidden: KtSymbol, +internal class InvisibleReferenceImpl( + override val reference: KtSymbol, firDiagnostic: FirPsiDiagnostic<*>, override val token: ValidityToken, -) : KtFirDiagnostic.Hidden(), KtAbstractFirDiagnostic { +) : KtFirDiagnostic.InvisibleReference(), KtAbstractFirDiagnostic { override val firDiagnostic: FirPsiDiagnostic<*> by weakRef(firDiagnostic) } diff --git a/idea/testData/checker/diagnosticsMessage/fullPackageFQNameOnVisiblityError.fir.kt b/idea/testData/checker/diagnosticsMessage/fullPackageFQNameOnVisiblityError.fir.kt index d6823c82ea1..929b2af4669 100644 --- a/idea/testData/checker/diagnosticsMessage/fullPackageFQNameOnVisiblityError.fir.kt +++ b/idea/testData/checker/diagnosticsMessage/fullPackageFQNameOnVisiblityError.fir.kt @@ -2,5 +2,5 @@ package a.b -@kotlin.internal.InlineOnly +@kotlin.internal.InlineOnly inline fun foo() {}