From d0cc86f52cee2131b3115831fac88ece4b0e3785 Mon Sep 17 00:00:00 2001 From: Kirill Rakhman Date: Fri, 11 Aug 2023 11:00:37 +0200 Subject: [PATCH] [Tests] Update test data after changes to FIR diagnostic messages --- .../callResolver/resolveCall/ambiguous.txt | 2 +- .../resolveCall/ambiguousImplicitInvoke.txt | 2 +- .../ambiguousWithExplicitTypeParameters.txt | 2 +- .../ambiguousWithInferredTypeParameters.txt | 2 +- ...egatedConstructorCall_super_unresolved.txt | 2 +- ...legatedConstructorCall_this_unresolved.txt | 2 +- .../resolveCall/hiddenConstructor.txt | 2 +- .../hiddenDeprecated.descriptors.txt | 3 + .../resolveCall/hiddenDeprecated.txt | 2 +- ...ndexedGetWithNotEnoughArgs.descriptors.txt | 40 ++++++ .../indexedGetWithNotEnoughArgs.txt | 2 +- .../resolveCall/indexedGetWithTooManyArgs.txt | 2 +- ...ndexedSetWithNotEnoughArgs.descriptors.txt | 52 ++++++++ .../indexedSetWithNotEnoughArgs.txt | 2 +- .../resolveCall/indexedSetWithTooManyArgs.txt | 2 +- .../invalidCode/assignementInExpression.txt | 2 +- .../invalidCode/getterAssignment.txt | 2 +- .../resolveCall/privateMember.txt | 2 +- .../simpleCallWithNonMatchingArgs.txt | 2 +- .../resolveCall/typecheckerRecursiveError.txt | 2 +- .../multipleCandidates/ambiguous.txt | 8 +- .../ambiguousImplicitInvoke.descriptors.txt | 77 ++++++++++++ .../ambiguousImplicitInvoke.txt | 8 +- ...WithExplicitTypeParameters.descriptors.txt | 116 ++++++++++++++++++ .../ambiguousWithExplicitTypeParameters.txt | 8 +- .../ambiguousWithInferredTypeParameters.txt | 8 +- .../delegatedConstructor.txt | 4 +- .../multipleCandidates/groupBy.txt | 4 +- .../multipleCandidates/implicitInvoke.txt | 6 +- .../implicitInvokeWithReceiver.txt | 2 +- .../delegatedConstructorInapplicable.txt | 2 +- ...orInapplicableDifferentParametersCount.txt | 2 +- ...ndexedGetWithNotEnoughArgs.descriptors.txt | 39 ++++++ .../indexedGetWithNotEnoughArgs.txt | 4 +- .../indexedGetWithTooManyArgs.txt | 4 +- ...ndexedSetWithNotEnoughArgs.descriptors.txt | 51 ++++++++ .../indexedSetWithNotEnoughArgs.txt | 4 +- .../indexedSetWithTooManyArgs.txt | 4 +- .../singleCandidate/privateMember.txt | 4 +- .../simpleCallWithNonMatchingArgs.txt | 4 +- .../cli/jvm/conflictingProjection.out | 10 +- .../testData/cli/jvm/extendedCheckers.out | 2 +- .../testData/cli/jvm/firDeprecationJava.out | 6 +- compiler/testData/cli/jvm/firError.out | 12 +- .../testData/cli/jvm/firErrorOnLastLine.out | 4 +- .../cli/jvm/firErrorOnLastLineNoEol.out | 4 +- .../firFriendlyErrorIfNoJdkOptionIsSet.out | 4 +- compiler/testData/cli/jvm/firLightTreeOff.out | 8 +- compiler/testData/cli/jvm/firLightTreeOn.out | 8 +- compiler/testData/cli/jvm/firSyntaxError.out | 2 +- .../cli/jvm/inapplicableLateinitModifier.out | 18 +-- .../cli/jvm/instanceAccessBeforeSuperCall.out | 12 +- .../cli/jvm/twoDiagnosticsOnSingleElement.out | 4 +- .../output.fir.txt | 6 +- .../output.fir.txt | 6 +- .../classFromJdkInLibrary/output.fir.txt | 4 + .../contextualDeclarationUse/output.fir.txt | 16 +++ .../internalFromForeignModule/output.fir.txt | 12 +- .../output.fir.txt | 4 + .../output.fir.txt | 4 +- .../output.fir.txt | 17 +++ .../invisibleClassObjects.fir.diag.txt | 28 ++--- .../kt47986Default.fir.diag.txt | 2 +- .../kt47986Disabled.fir.diag.txt | 2 +- .../builderInference/kt47986_2.fir.diag.txt | 2 +- .../builderInference/kt47986_3.fir.diag.txt | 2 +- .../builderInference/kt51464.fir.diag.txt | 2 +- .../kt45461.fir.diag.txt | 2 +- .../kt45461_12.fir.diag.txt | 2 +- .../kt45461_2.fir.diag.txt | 4 +- .../kt45461_25.fir.diag.txt | 6 +- .../kt45461_26.fir.diag.txt | 4 +- .../kt45461_5.fir.diag.txt | 2 +- .../kt48765.fir.diag.txt | 6 +- .../kt48935.fir.diag.txt | 2 +- .../kt49661.fir.diag.txt | 2 +- ...ovariantAndContravariantTypes.fir.diag.txt | 2 +- .../nonPublicMember/kt55179.fir.diag.txt | 8 +- ...terWithKotlinNullableWarnings.fir.diag.txt | 8 +- ...verridesDefinitelyNonNullable.fir.diag.txt | 4 +- .../checkDiagnosticFullText.fir.diag.txt | 8 +- .../complexExpression.fir.diag.txt | 2 +- ...ienPropertyFromInvisibleClass.fir.diag.txt | 4 +- .../dsl/errors/notFirstStatement.fir.kt | 6 +- .../testsWithStdLib/labelClashes.fir.diag.txt | 8 +- .../upperBoundViolated2.fir.diag.txt | 2 +- .../jdkModulesFromNamed/main.fir.txt | 2 +- .../releaseFlag/moduleSwing.fir.txt | 2 +- .../main.fir.txt | 11 ++ .../moduleB.fir.txt | 7 ++ .../jvmhost/test/ScriptingHostTest.kt | 3 +- .../EnumEntriesWithOutdatedStdlibTest.kt | 4 +- .../kotlin/mainKts/test/mainKtsTest.kt | 9 +- .../src/it/test-customJdk/verify.bsh | 7 +- .../diagnostics/incorrectUsage.fir.diag.txt | 4 +- .../diagnostics/localVariables.fir.diag.txt | 14 +-- .../methodDeclaration.fir.diag.txt | 4 +- .../diagnostics/noAnnotation.fir.diag.txt | 20 +-- .../diagnostics/otherOperators.fir.diag.txt | 38 +++--- .../plusAssignPrecedence.fir.diag.txt | 4 +- .../plugin/ScriptingWithCliCompilerTest.kt | 2 +- 101 files changed, 675 insertions(+), 227 deletions(-) create mode 100644 analysis/analysis-api/testData/components/callResolver/resolveCall/hiddenDeprecated.descriptors.txt create mode 100644 analysis/analysis-api/testData/components/callResolver/resolveCall/indexedGetWithNotEnoughArgs.descriptors.txt create mode 100644 analysis/analysis-api/testData/components/callResolver/resolveCall/indexedSetWithNotEnoughArgs.descriptors.txt create mode 100644 analysis/analysis-api/testData/components/callResolver/resolveCandidates/multipleCandidates/ambiguousImplicitInvoke.descriptors.txt create mode 100644 analysis/analysis-api/testData/components/callResolver/resolveCandidates/multipleCandidates/ambiguousWithExplicitTypeParameters.descriptors.txt create mode 100644 analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/indexedGetWithNotEnoughArgs.descriptors.txt create mode 100644 analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/indexedSetWithNotEnoughArgs.descriptors.txt create mode 100644 compiler/testData/compileKotlinAgainstCustomBinaries/classFromJdkInLibrary/output.fir.txt create mode 100644 compiler/testData/compileKotlinAgainstCustomBinaries/contextualDeclarationUse/output.fir.txt create mode 100644 compiler/testData/compileKotlinAgainstCustomBinaries/jvmDefaultNonDefaultInheritanceSuperCall/output.fir.txt create mode 100644 compiler/testData/compileKotlinAgainstCustomBinaries/sealedInheritorInDifferentModule/output.fir.txt create mode 100644 compiler/testData/javaModules/severalModulesWithTheSameName/main.fir.txt create mode 100644 compiler/testData/javaModules/unnamedDoesNotReadNotAdded/moduleB.fir.txt diff --git a/analysis/analysis-api/testData/components/callResolver/resolveCall/ambiguous.txt b/analysis/analysis-api/testData/components/callResolver/resolveCall/ambiguous.txt index f8687c9efb2..b13ecae010b 100644 --- a/analysis/analysis-api/testData/components/callResolver/resolveCall/ambiguous.txt +++ b/analysis/analysis-api/testData/components/callResolver/resolveCall/ambiguous.txt @@ -82,4 +82,4 @@ KtErrorCallInfo: callableIdIfNonLocal = null) } ] - diagnostic = ERROR \ No newline at end of file + diagnostic = ERROR diff --git a/analysis/analysis-api/testData/components/callResolver/resolveCall/ambiguousImplicitInvoke.txt b/analysis/analysis-api/testData/components/callResolver/resolveCall/ambiguousImplicitInvoke.txt index 00079570c4a..b64e346af04 100644 --- a/analysis/analysis-api/testData/components/callResolver/resolveCall/ambiguousImplicitInvoke.txt +++ b/analysis/analysis-api/testData/components/callResolver/resolveCall/ambiguousImplicitInvoke.txt @@ -47,4 +47,4 @@ KtErrorCallInfo: typeArgumentsMapping = {} argumentMapping = {} ] - diagnostic = ERROR \ No newline at end of file + diagnostic = ERROR diff --git a/analysis/analysis-api/testData/components/callResolver/resolveCall/ambiguousWithExplicitTypeParameters.txt b/analysis/analysis-api/testData/components/callResolver/resolveCall/ambiguousWithExplicitTypeParameters.txt index 3719eb34a94..eff3af90f04 100644 --- a/analysis/analysis-api/testData/components/callResolver/resolveCall/ambiguousWithExplicitTypeParameters.txt +++ b/analysis/analysis-api/testData/components/callResolver/resolveCall/ambiguousWithExplicitTypeParameters.txt @@ -106,4 +106,4 @@ KtErrorCallInfo: callableIdIfNonLocal = null) } ] - diagnostic = ERROR function(t: T, a: Char): Unit, fun function(u: U, b: Boolean): Unit, fun function(v: V, c: String): Unit]> \ No newline at end of file + diagnostic = ERROR function(t: T, a: Char): Unit, fun function(u: U, b: Boolean): Unit, fun function(v: V, c: String): Unit]> diff --git a/analysis/analysis-api/testData/components/callResolver/resolveCall/ambiguousWithInferredTypeParameters.txt b/analysis/analysis-api/testData/components/callResolver/resolveCall/ambiguousWithInferredTypeParameters.txt index afa1e6287f6..e8c9c6b5764 100644 --- a/analysis/analysis-api/testData/components/callResolver/resolveCall/ambiguousWithInferredTypeParameters.txt +++ b/analysis/analysis-api/testData/components/callResolver/resolveCall/ambiguousWithInferredTypeParameters.txt @@ -100,4 +100,4 @@ KtErrorCallInfo: callableIdIfNonLocal = null) } ] - diagnostic = ERROR function(t: T, a: Char): Unit, fun function(u: U, b: Boolean): Unit, fun function(v: V, c: String): Unit]> \ No newline at end of file + diagnostic = ERROR function(t: T, a: Char): Unit, fun function(u: U, b: Boolean): Unit, fun function(v: V, c: String): Unit]> diff --git a/analysis/analysis-api/testData/components/callResolver/resolveCall/delegatedConstructorCall_super_unresolved.txt b/analysis/analysis-api/testData/components/callResolver/resolveCall/delegatedConstructorCall_super_unresolved.txt index 2ec13b3d8b0..fea1e628a5a 100644 --- a/analysis/analysis-api/testData/components/callResolver/resolveCall/delegatedConstructorCall_super_unresolved.txt +++ b/analysis/analysis-api/testData/components/callResolver/resolveCall/delegatedConstructorCall_super_unresolved.txt @@ -28,4 +28,4 @@ KtErrorCallInfo: callableIdIfNonLocal = null) } ] - diagnostic = ERROR \ No newline at end of file + diagnostic = ERROR diff --git a/analysis/analysis-api/testData/components/callResolver/resolveCall/delegatedConstructorCall_this_unresolved.txt b/analysis/analysis-api/testData/components/callResolver/resolveCall/delegatedConstructorCall_this_unresolved.txt index 2d36533bfbb..022af9439a5 100644 --- a/analysis/analysis-api/testData/components/callResolver/resolveCall/delegatedConstructorCall_this_unresolved.txt +++ b/analysis/analysis-api/testData/components/callResolver/resolveCall/delegatedConstructorCall_this_unresolved.txt @@ -47,4 +47,4 @@ KtErrorCallInfo: typeArgumentsMapping = {} argumentMapping = {} ] - diagnostic = ERROR \ No newline at end of file + diagnostic = ERROR diff --git a/analysis/analysis-api/testData/components/callResolver/resolveCall/hiddenConstructor.txt b/analysis/analysis-api/testData/components/callResolver/resolveCall/hiddenConstructor.txt index 590bfc20f05..b31c61e6546 100644 --- a/analysis/analysis-api/testData/components/callResolver/resolveCall/hiddenConstructor.txt +++ b/analysis/analysis-api/testData/components/callResolver/resolveCall/hiddenConstructor.txt @@ -1,3 +1,3 @@ KtErrorCallInfo: candidateCalls = [] - diagnostic = ERROR + diagnostic = ERROR diff --git a/analysis/analysis-api/testData/components/callResolver/resolveCall/hiddenDeprecated.descriptors.txt b/analysis/analysis-api/testData/components/callResolver/resolveCall/hiddenDeprecated.descriptors.txt new file mode 100644 index 00000000000..e2779c595a9 --- /dev/null +++ b/analysis/analysis-api/testData/components/callResolver/resolveCall/hiddenDeprecated.descriptors.txt @@ -0,0 +1,3 @@ +KtErrorCallInfo: + candidateCalls = [] + diagnostic = ERROR \ No newline at end of file diff --git a/analysis/analysis-api/testData/components/callResolver/resolveCall/hiddenDeprecated.txt b/analysis/analysis-api/testData/components/callResolver/resolveCall/hiddenDeprecated.txt index e2779c595a9..738046997d8 100644 --- a/analysis/analysis-api/testData/components/callResolver/resolveCall/hiddenDeprecated.txt +++ b/analysis/analysis-api/testData/components/callResolver/resolveCall/hiddenDeprecated.txt @@ -1,3 +1,3 @@ KtErrorCallInfo: candidateCalls = [] - diagnostic = ERROR \ No newline at end of file + diagnostic = ERROR diff --git a/analysis/analysis-api/testData/components/callResolver/resolveCall/indexedGetWithNotEnoughArgs.descriptors.txt b/analysis/analysis-api/testData/components/callResolver/resolveCall/indexedGetWithNotEnoughArgs.descriptors.txt new file mode 100644 index 00000000000..4bc43f87699 --- /dev/null +++ b/analysis/analysis-api/testData/components/callResolver/resolveCall/indexedGetWithNotEnoughArgs.descriptors.txt @@ -0,0 +1,40 @@ +KtErrorCallInfo: + candidateCalls = [ + KtSimpleFunctionCall: + isImplicitInvoke = false + partiallyAppliedSymbol = KtPartiallyAppliedSymbol: + dispatchReceiver = KtExplicitReceiverValue: + expression = c + isSafeNavigation = false + type = C + extensionReceiver = null + signature = KtFunctionLikeSignature: + receiverType = null + returnType = kotlin.Boolean + symbol = /C.get(: C, a: kotlin.Int, b: kotlin.String): kotlin.Boolean + valueParameters = [ + KtVariableLikeSignature: + name = a + receiverType = null + returnType = kotlin.Int + symbol = a: kotlin.Int + callableIdIfNonLocal = null, + KtVariableLikeSignature: + name = b + receiverType = null + returnType = kotlin.String + symbol = b: kotlin.String + callableIdIfNonLocal = null + ] + callableIdIfNonLocal = /C.get + typeArgumentsMapping = {} + argumentMapping = { + 1 -> (KtVariableLikeSignature: + name = a + receiverType = null + returnType = kotlin.Int + symbol = a: kotlin.Int + callableIdIfNonLocal = null) + } + ] + diagnostic = ERROR \ No newline at end of file diff --git a/analysis/analysis-api/testData/components/callResolver/resolveCall/indexedGetWithNotEnoughArgs.txt b/analysis/analysis-api/testData/components/callResolver/resolveCall/indexedGetWithNotEnoughArgs.txt index c7be1f5098b..98d1008cacd 100644 --- a/analysis/analysis-api/testData/components/callResolver/resolveCall/indexedGetWithNotEnoughArgs.txt +++ b/analysis/analysis-api/testData/components/callResolver/resolveCall/indexedGetWithNotEnoughArgs.txt @@ -37,4 +37,4 @@ KtErrorCallInfo: callableIdIfNonLocal = null) } ] - diagnostic = ERROR + diagnostic = ERROR diff --git a/analysis/analysis-api/testData/components/callResolver/resolveCall/indexedGetWithTooManyArgs.txt b/analysis/analysis-api/testData/components/callResolver/resolveCall/indexedGetWithTooManyArgs.txt index 222c097ec39..20e005bc31a 100644 --- a/analysis/analysis-api/testData/components/callResolver/resolveCall/indexedGetWithTooManyArgs.txt +++ b/analysis/analysis-api/testData/components/callResolver/resolveCall/indexedGetWithTooManyArgs.txt @@ -43,4 +43,4 @@ KtErrorCallInfo: callableIdIfNonLocal = null) } ] - diagnostic = ERROR \ No newline at end of file + diagnostic = ERROR diff --git a/analysis/analysis-api/testData/components/callResolver/resolveCall/indexedSetWithNotEnoughArgs.descriptors.txt b/analysis/analysis-api/testData/components/callResolver/resolveCall/indexedSetWithNotEnoughArgs.descriptors.txt new file mode 100644 index 00000000000..4b74939ade8 --- /dev/null +++ b/analysis/analysis-api/testData/components/callResolver/resolveCall/indexedSetWithNotEnoughArgs.descriptors.txt @@ -0,0 +1,52 @@ +KtErrorCallInfo: + candidateCalls = [ + KtSimpleFunctionCall: + isImplicitInvoke = false + partiallyAppliedSymbol = KtPartiallyAppliedSymbol: + dispatchReceiver = KtExplicitReceiverValue: + expression = c + isSafeNavigation = false + type = C + extensionReceiver = null + signature = KtFunctionLikeSignature: + receiverType = null + returnType = kotlin.Unit + symbol = /C.set(: C, a: kotlin.Int, b: kotlin.String, value: kotlin.Boolean): kotlin.Unit + valueParameters = [ + KtVariableLikeSignature: + name = a + receiverType = null + returnType = kotlin.Int + symbol = a: kotlin.Int + callableIdIfNonLocal = null, + KtVariableLikeSignature: + name = b + receiverType = null + returnType = kotlin.String + symbol = b: kotlin.String + callableIdIfNonLocal = null, + KtVariableLikeSignature: + name = value + receiverType = null + returnType = kotlin.Boolean + symbol = value: kotlin.Boolean + callableIdIfNonLocal = null + ] + callableIdIfNonLocal = /C.set + typeArgumentsMapping = {} + argumentMapping = { + 1 -> (KtVariableLikeSignature: + name = a + receiverType = null + returnType = kotlin.Int + symbol = a: kotlin.Int + callableIdIfNonLocal = null), + false -> (KtVariableLikeSignature: + name = value + receiverType = null + returnType = kotlin.Boolean + symbol = value: kotlin.Boolean + callableIdIfNonLocal = null) + } + ] + diagnostic = ERROR \ No newline at end of file diff --git a/analysis/analysis-api/testData/components/callResolver/resolveCall/indexedSetWithNotEnoughArgs.txt b/analysis/analysis-api/testData/components/callResolver/resolveCall/indexedSetWithNotEnoughArgs.txt index 270453e5ab3..8e6ead6b0aa 100644 --- a/analysis/analysis-api/testData/components/callResolver/resolveCall/indexedSetWithNotEnoughArgs.txt +++ b/analysis/analysis-api/testData/components/callResolver/resolveCall/indexedSetWithNotEnoughArgs.txt @@ -49,4 +49,4 @@ KtErrorCallInfo: callableIdIfNonLocal = null) } ] - diagnostic = ERROR + diagnostic = ERROR diff --git a/analysis/analysis-api/testData/components/callResolver/resolveCall/indexedSetWithTooManyArgs.txt b/analysis/analysis-api/testData/components/callResolver/resolveCall/indexedSetWithTooManyArgs.txt index 4e491da6f32..9a497f19ec8 100644 --- a/analysis/analysis-api/testData/components/callResolver/resolveCall/indexedSetWithTooManyArgs.txt +++ b/analysis/analysis-api/testData/components/callResolver/resolveCall/indexedSetWithTooManyArgs.txt @@ -55,4 +55,4 @@ KtErrorCallInfo: callableIdIfNonLocal = null) } ] - diagnostic = ERROR \ No newline at end of file + diagnostic = ERROR diff --git a/analysis/analysis-api/testData/components/callResolver/resolveCall/invalidCode/assignementInExpression.txt b/analysis/analysis-api/testData/components/callResolver/resolveCall/invalidCode/assignementInExpression.txt index aac2a0faecc..ed8816f3702 100644 --- a/analysis/analysis-api/testData/components/callResolver/resolveCall/invalidCode/assignementInExpression.txt +++ b/analysis/analysis-api/testData/components/callResolver/resolveCall/invalidCode/assignementInExpression.txt @@ -1,3 +1,3 @@ KtErrorCallInfo: candidateCalls = [] - diagnostic = ERROR + diagnostic = ERROR diff --git a/analysis/analysis-api/testData/components/callResolver/resolveCall/invalidCode/getterAssignment.txt b/analysis/analysis-api/testData/components/callResolver/resolveCall/invalidCode/getterAssignment.txt index db19cefc83e..67fe5cf1c6b 100644 --- a/analysis/analysis-api/testData/components/callResolver/resolveCall/invalidCode/getterAssignment.txt +++ b/analysis/analysis-api/testData/components/callResolver/resolveCall/invalidCode/getterAssignment.txt @@ -1,3 +1,3 @@ KtErrorCallInfo: candidateCalls = [] - diagnostic = ERROR + diagnostic = ERROR diff --git a/analysis/analysis-api/testData/components/callResolver/resolveCall/privateMember.txt b/analysis/analysis-api/testData/components/callResolver/resolveCall/privateMember.txt index d5d6ba35ad8..336c120dd7c 100644 --- a/analysis/analysis-api/testData/components/callResolver/resolveCall/privateMember.txt +++ b/analysis/analysis-api/testData/components/callResolver/resolveCall/privateMember.txt @@ -17,4 +17,4 @@ KtErrorCallInfo: typeArgumentsMapping = {} argumentMapping = {} ] - diagnostic = ERROR \ No newline at end of file + diagnostic = ERROR diff --git a/analysis/analysis-api/testData/components/callResolver/resolveCall/simpleCallWithNonMatchingArgs.txt b/analysis/analysis-api/testData/components/callResolver/resolveCall/simpleCallWithNonMatchingArgs.txt index f274c0b89e4..9fde8eb0c0c 100644 --- a/analysis/analysis-api/testData/components/callResolver/resolveCall/simpleCallWithNonMatchingArgs.txt +++ b/analysis/analysis-api/testData/components/callResolver/resolveCall/simpleCallWithNonMatchingArgs.txt @@ -14,4 +14,4 @@ KtErrorCallInfo: typeArgumentsMapping = {} argumentMapping = {} ] - diagnostic = ERROR \ No newline at end of file + diagnostic = ERROR diff --git a/analysis/analysis-api/testData/components/callResolver/resolveCall/typecheckerRecursiveError.txt b/analysis/analysis-api/testData/components/callResolver/resolveCall/typecheckerRecursiveError.txt index 531dff3f7ec..3d59288cde0 100644 --- a/analysis/analysis-api/testData/components/callResolver/resolveCall/typecheckerRecursiveError.txt +++ b/analysis/analysis-api/testData/components/callResolver/resolveCall/typecheckerRecursiveError.txt @@ -1,3 +1,3 @@ KtErrorCallInfo: candidateCalls = [] - diagnostic = ERROR \ No newline at end of file + diagnostic = ERROR diff --git a/analysis/analysis-api/testData/components/callResolver/resolveCandidates/multipleCandidates/ambiguous.txt b/analysis/analysis-api/testData/components/callResolver/resolveCandidates/multipleCandidates/ambiguous.txt index 12dbe11759e..ae3f30e5acf 100644 --- a/analysis/analysis-api/testData/components/callResolver/resolveCandidates/multipleCandidates/ambiguous.txt +++ b/analysis/analysis-api/testData/components/callResolver/resolveCandidates/multipleCandidates/ambiguous.txt @@ -1,5 +1,5 @@ KtInapplicableCallCandidateInfo: - diagnostic = ERROR + diagnostic = ERROR candidate = KtSimpleFunctionCall: isImplicitInvoke = false partiallyAppliedSymbol = KtPartiallyAppliedSymbol: @@ -30,7 +30,7 @@ KtInapplicableCallCandidateInfo: isInBestCandidates = true KtInapplicableCallCandidateInfo: - diagnostic = ERROR + diagnostic = ERROR candidate = KtSimpleFunctionCall: isImplicitInvoke = false partiallyAppliedSymbol = KtPartiallyAppliedSymbol: @@ -61,7 +61,7 @@ KtInapplicableCallCandidateInfo: isInBestCandidates = true KtInapplicableCallCandidateInfo: - diagnostic = ERROR + diagnostic = ERROR candidate = KtSimpleFunctionCall: isImplicitInvoke = false partiallyAppliedSymbol = KtPartiallyAppliedSymbol: @@ -89,4 +89,4 @@ KtInapplicableCallCandidateInfo: symbol = c: kotlin.String callableIdIfNonLocal = null) } - isInBestCandidates = true + isInBestCandidates = true \ No newline at end of file diff --git a/analysis/analysis-api/testData/components/callResolver/resolveCandidates/multipleCandidates/ambiguousImplicitInvoke.descriptors.txt b/analysis/analysis-api/testData/components/callResolver/resolveCandidates/multipleCandidates/ambiguousImplicitInvoke.descriptors.txt new file mode 100644 index 00000000000..bdb383a6f0c --- /dev/null +++ b/analysis/analysis-api/testData/components/callResolver/resolveCandidates/multipleCandidates/ambiguousImplicitInvoke.descriptors.txt @@ -0,0 +1,77 @@ +KtInapplicableCallCandidateInfo: + diagnostic = ERROR + candidate = KtSimpleFunctionCall: + isImplicitInvoke = true + partiallyAppliedSymbol = KtPartiallyAppliedSymbol: + dispatchReceiver = null + extensionReceiver = KtExplicitReceiverValue: + expression = x + isSafeNavigation = false + type = kotlin.Int + signature = KtFunctionLikeSignature: + receiverType = kotlin.Int + returnType = kotlin.Unit + symbol = invoke(: kotlin.Int, a: kotlin.String): kotlin.Unit + valueParameters = [ + KtVariableLikeSignature: + name = a + receiverType = null + returnType = kotlin.String + symbol = a: kotlin.String + callableIdIfNonLocal = null + ] + callableIdIfNonLocal = null + typeArgumentsMapping = {} + argumentMapping = {} + isInBestCandidates = true + +KtInapplicableCallCandidateInfo: + diagnostic = ERROR + candidate = KtSimpleFunctionCall: + isImplicitInvoke = true + partiallyAppliedSymbol = KtPartiallyAppliedSymbol: + dispatchReceiver = null + extensionReceiver = KtExplicitReceiverValue: + expression = x + isSafeNavigation = false + type = kotlin.Int + signature = KtFunctionLikeSignature: + receiverType = kotlin.Int + returnType = kotlin.Unit + symbol = invoke(: kotlin.Int, b: kotlin.Boolean): kotlin.Unit + valueParameters = [ + KtVariableLikeSignature: + name = b + receiverType = null + returnType = kotlin.Boolean + symbol = b: kotlin.Boolean + callableIdIfNonLocal = null + ] + callableIdIfNonLocal = null + typeArgumentsMapping = {} + argumentMapping = {} + isInBestCandidates = true + +KtInapplicableCallCandidateInfo: + diagnostic = ERROR + candidate = KtSimpleFunctionCall: + isImplicitInvoke = false + partiallyAppliedSymbol = KtPartiallyAppliedSymbol: + dispatchReceiver = null + extensionReceiver = null + signature = KtFunctionLikeSignature: + receiverType = null + returnType = kotlin.Unit + symbol = /x(c: kotlin.Char): kotlin.Unit + valueParameters = [ + KtVariableLikeSignature: + name = c + receiverType = null + returnType = kotlin.Char + symbol = c: kotlin.Char + callableIdIfNonLocal = null + ] + callableIdIfNonLocal = /x + typeArgumentsMapping = {} + argumentMapping = {} + isInBestCandidates = false \ No newline at end of file diff --git a/analysis/analysis-api/testData/components/callResolver/resolveCandidates/multipleCandidates/ambiguousImplicitInvoke.txt b/analysis/analysis-api/testData/components/callResolver/resolveCandidates/multipleCandidates/ambiguousImplicitInvoke.txt index ff0945587f6..5b39796b38b 100644 --- a/analysis/analysis-api/testData/components/callResolver/resolveCandidates/multipleCandidates/ambiguousImplicitInvoke.txt +++ b/analysis/analysis-api/testData/components/callResolver/resolveCandidates/multipleCandidates/ambiguousImplicitInvoke.txt @@ -1,5 +1,5 @@ KtInapplicableCallCandidateInfo: - diagnostic = ERROR + diagnostic = ERROR candidate = KtSimpleFunctionCall: isImplicitInvoke = true partiallyAppliedSymbol = KtPartiallyAppliedSymbol: @@ -26,7 +26,7 @@ KtInapplicableCallCandidateInfo: isInBestCandidates = true KtInapplicableCallCandidateInfo: - diagnostic = ERROR + diagnostic = ERROR candidate = KtSimpleFunctionCall: isImplicitInvoke = true partiallyAppliedSymbol = KtPartiallyAppliedSymbol: @@ -53,7 +53,7 @@ KtInapplicableCallCandidateInfo: isInBestCandidates = true KtInapplicableCallCandidateInfo: - diagnostic = ERROR + diagnostic = ERROR candidate = KtSimpleFunctionCall: isImplicitInvoke = false partiallyAppliedSymbol = KtPartiallyAppliedSymbol: @@ -74,4 +74,4 @@ KtInapplicableCallCandidateInfo: callableIdIfNonLocal = /x typeArgumentsMapping = {} argumentMapping = {} - isInBestCandidates = false + isInBestCandidates = false \ No newline at end of file diff --git a/analysis/analysis-api/testData/components/callResolver/resolveCandidates/multipleCandidates/ambiguousWithExplicitTypeParameters.descriptors.txt b/analysis/analysis-api/testData/components/callResolver/resolveCandidates/multipleCandidates/ambiguousWithExplicitTypeParameters.descriptors.txt new file mode 100644 index 00000000000..88e8d5b3d0f --- /dev/null +++ b/analysis/analysis-api/testData/components/callResolver/resolveCandidates/multipleCandidates/ambiguousWithExplicitTypeParameters.descriptors.txt @@ -0,0 +1,116 @@ +KtInapplicableCallCandidateInfo: + diagnostic = ERROR + candidate = KtSimpleFunctionCall: + isImplicitInvoke = false + partiallyAppliedSymbol = KtPartiallyAppliedSymbol: + dispatchReceiver = null + extensionReceiver = null + signature = KtFunctionLikeSignature: + receiverType = null + returnType = kotlin.Unit + symbol = /function(t: T, a: kotlin.Char): kotlin.Unit + valueParameters = [ + KtVariableLikeSignature: + name = t + receiverType = null + returnType = kotlin.Int + symbol = t: T + callableIdIfNonLocal = null, + KtVariableLikeSignature: + name = a + receiverType = null + returnType = kotlin.Char + symbol = a: kotlin.Char + callableIdIfNonLocal = null + ] + callableIdIfNonLocal = /function + typeArgumentsMapping = { + T -> (kotlin.Int) + } + argumentMapping = { + 1 -> (KtVariableLikeSignature: + name = t + receiverType = null + returnType = kotlin.Int + symbol = t: T + callableIdIfNonLocal = null) + } + isInBestCandidates = true + +KtInapplicableCallCandidateInfo: + diagnostic = ERROR + candidate = KtSimpleFunctionCall: + isImplicitInvoke = false + partiallyAppliedSymbol = KtPartiallyAppliedSymbol: + dispatchReceiver = null + extensionReceiver = null + signature = KtFunctionLikeSignature: + receiverType = null + returnType = kotlin.Unit + symbol = /function(u: U, b: kotlin.Boolean): kotlin.Unit + valueParameters = [ + KtVariableLikeSignature: + name = u + receiverType = null + returnType = kotlin.Int + symbol = u: U + callableIdIfNonLocal = null, + KtVariableLikeSignature: + name = b + receiverType = null + returnType = kotlin.Boolean + symbol = b: kotlin.Boolean + callableIdIfNonLocal = null + ] + callableIdIfNonLocal = /function + typeArgumentsMapping = { + U -> (kotlin.Int) + } + argumentMapping = { + 1 -> (KtVariableLikeSignature: + name = u + receiverType = null + returnType = kotlin.Int + symbol = u: U + callableIdIfNonLocal = null) + } + isInBestCandidates = true + +KtInapplicableCallCandidateInfo: + diagnostic = ERROR + candidate = KtSimpleFunctionCall: + isImplicitInvoke = false + partiallyAppliedSymbol = KtPartiallyAppliedSymbol: + dispatchReceiver = null + extensionReceiver = null + signature = KtFunctionLikeSignature: + receiverType = null + returnType = kotlin.Unit + symbol = /function(v: V, c: kotlin.String): kotlin.Unit + valueParameters = [ + KtVariableLikeSignature: + name = v + receiverType = null + returnType = kotlin.Int + symbol = v: V + callableIdIfNonLocal = null, + KtVariableLikeSignature: + name = c + receiverType = null + returnType = kotlin.String + symbol = c: kotlin.String + callableIdIfNonLocal = null + ] + callableIdIfNonLocal = /function + typeArgumentsMapping = { + V -> (kotlin.Int) + } + argumentMapping = { + 1 -> (KtVariableLikeSignature: + name = v + receiverType = null + returnType = kotlin.Int + symbol = v: V + callableIdIfNonLocal = null) + } + isInBestCandidates = true \ No newline at end of file diff --git a/analysis/analysis-api/testData/components/callResolver/resolveCandidates/multipleCandidates/ambiguousWithExplicitTypeParameters.txt b/analysis/analysis-api/testData/components/callResolver/resolveCandidates/multipleCandidates/ambiguousWithExplicitTypeParameters.txt index 241fdf485dd..7b8000de6fd 100644 --- a/analysis/analysis-api/testData/components/callResolver/resolveCandidates/multipleCandidates/ambiguousWithExplicitTypeParameters.txt +++ b/analysis/analysis-api/testData/components/callResolver/resolveCandidates/multipleCandidates/ambiguousWithExplicitTypeParameters.txt @@ -1,5 +1,5 @@ KtInapplicableCallCandidateInfo: - diagnostic = ERROR + diagnostic = ERROR candidate = KtSimpleFunctionCall: isImplicitInvoke = false partiallyAppliedSymbol = KtPartiallyAppliedSymbol: @@ -38,7 +38,7 @@ KtInapplicableCallCandidateInfo: isInBestCandidates = true KtInapplicableCallCandidateInfo: - diagnostic = ERROR + diagnostic = ERROR candidate = KtSimpleFunctionCall: isImplicitInvoke = false partiallyAppliedSymbol = KtPartiallyAppliedSymbol: @@ -77,7 +77,7 @@ KtInapplicableCallCandidateInfo: isInBestCandidates = true KtInapplicableCallCandidateInfo: - diagnostic = ERROR + diagnostic = ERROR candidate = KtSimpleFunctionCall: isImplicitInvoke = false partiallyAppliedSymbol = KtPartiallyAppliedSymbol: @@ -113,4 +113,4 @@ KtInapplicableCallCandidateInfo: symbol = v: V callableIdIfNonLocal = null) } - isInBestCandidates = true + isInBestCandidates = true \ No newline at end of file diff --git a/analysis/analysis-api/testData/components/callResolver/resolveCandidates/multipleCandidates/ambiguousWithInferredTypeParameters.txt b/analysis/analysis-api/testData/components/callResolver/resolveCandidates/multipleCandidates/ambiguousWithInferredTypeParameters.txt index 479e4d4cf69..54587e22624 100644 --- a/analysis/analysis-api/testData/components/callResolver/resolveCandidates/multipleCandidates/ambiguousWithInferredTypeParameters.txt +++ b/analysis/analysis-api/testData/components/callResolver/resolveCandidates/multipleCandidates/ambiguousWithInferredTypeParameters.txt @@ -1,5 +1,5 @@ KtInapplicableCallCandidateInfo: - diagnostic = ERROR + diagnostic = ERROR candidate = KtSimpleFunctionCall: isImplicitInvoke = false partiallyAppliedSymbol = KtPartiallyAppliedSymbol: @@ -36,7 +36,7 @@ KtInapplicableCallCandidateInfo: isInBestCandidates = true KtInapplicableCallCandidateInfo: - diagnostic = ERROR + diagnostic = ERROR candidate = KtSimpleFunctionCall: isImplicitInvoke = false partiallyAppliedSymbol = KtPartiallyAppliedSymbol: @@ -73,7 +73,7 @@ KtInapplicableCallCandidateInfo: isInBestCandidates = true KtInapplicableCallCandidateInfo: - diagnostic = ERROR + diagnostic = ERROR candidate = KtSimpleFunctionCall: isImplicitInvoke = false partiallyAppliedSymbol = KtPartiallyAppliedSymbol: @@ -107,4 +107,4 @@ KtInapplicableCallCandidateInfo: symbol = v: V callableIdIfNonLocal = null) } - isInBestCandidates = true + isInBestCandidates = true \ No newline at end of file diff --git a/analysis/analysis-api/testData/components/callResolver/resolveCandidates/multipleCandidates/delegatedConstructor.txt b/analysis/analysis-api/testData/components/callResolver/resolveCandidates/multipleCandidates/delegatedConstructor.txt index 2a226be1b49..c8e4c113c75 100644 --- a/analysis/analysis-api/testData/components/callResolver/resolveCandidates/multipleCandidates/delegatedConstructor.txt +++ b/analysis/analysis-api/testData/components/callResolver/resolveCandidates/multipleCandidates/delegatedConstructor.txt @@ -1,5 +1,5 @@ KtInapplicableCallCandidateInfo: - diagnostic = ERROR + diagnostic = ERROR candidate = KtDelegatedConstructorCall: kind = SUPER_CALL partiallyAppliedSymbol = KtPartiallyAppliedSymbol: @@ -16,7 +16,7 @@ KtInapplicableCallCandidateInfo: isInBestCandidates = false KtInapplicableCallCandidateInfo: - diagnostic = ERROR + diagnostic = ERROR candidate = KtDelegatedConstructorCall: kind = SUPER_CALL partiallyAppliedSymbol = KtPartiallyAppliedSymbol: diff --git a/analysis/analysis-api/testData/components/callResolver/resolveCandidates/multipleCandidates/groupBy.txt b/analysis/analysis-api/testData/components/callResolver/resolveCandidates/multipleCandidates/groupBy.txt index aa567c9970e..c93979c908f 100644 --- a/analysis/analysis-api/testData/components/callResolver/resolveCandidates/multipleCandidates/groupBy.txt +++ b/analysis/analysis-api/testData/components/callResolver/resolveCandidates/multipleCandidates/groupBy.txt @@ -48,7 +48,7 @@ KtApplicableCallCandidateInfo: isInBestCandidates = true KtInapplicableCallCandidateInfo: - diagnostic = ERROR kotlin/collections/Iterable.kotlin/collections/groupBy(keySelector: (T) -> K): kotlin/collections/Map>> + diagnostic = ERROR kotlin/collections/Iterable.kotlin/collections/groupBy(keySelector: (T) -> K): kotlin/collections/Map>'.> candidate = KtSimpleFunctionCall: isImplicitInvoke = false partiallyAppliedSymbol = KtPartiallyAppliedSymbol: @@ -130,4 +130,4 @@ KtInapplicableCallCandidateInfo: symbol = valueTransform: kotlin.Function1, kotlin.Int> callableIdIfNonLocal = null) } - isInBestCandidates = false + isInBestCandidates = false \ No newline at end of file diff --git a/analysis/analysis-api/testData/components/callResolver/resolveCandidates/multipleCandidates/implicitInvoke.txt b/analysis/analysis-api/testData/components/callResolver/resolveCandidates/multipleCandidates/implicitInvoke.txt index 89bd2c5c528..0592242584f 100644 --- a/analysis/analysis-api/testData/components/callResolver/resolveCandidates/multipleCandidates/implicitInvoke.txt +++ b/analysis/analysis-api/testData/components/callResolver/resolveCandidates/multipleCandidates/implicitInvoke.txt @@ -1,5 +1,5 @@ KtInapplicableCallCandidateInfo: - diagnostic = ERROR + diagnostic = ERROR candidate = KtSimpleFunctionCall: isImplicitInvoke = true partiallyAppliedSymbol = KtPartiallyAppliedSymbol: @@ -33,7 +33,7 @@ KtInapplicableCallCandidateInfo: isInBestCandidates = false KtInapplicableCallCandidateInfo: - diagnostic = ERROR + diagnostic = ERROR candidate = KtSimpleFunctionCall: isImplicitInvoke = false partiallyAppliedSymbol = KtPartiallyAppliedSymbol: @@ -91,4 +91,4 @@ KtApplicableCallCandidateInfo: symbol = b: kotlin.Boolean callableIdIfNonLocal = null) } - isInBestCandidates = true + isInBestCandidates = true \ No newline at end of file diff --git a/analysis/analysis-api/testData/components/callResolver/resolveCandidates/multipleCandidates/implicitInvokeWithReceiver.txt b/analysis/analysis-api/testData/components/callResolver/resolveCandidates/multipleCandidates/implicitInvokeWithReceiver.txt index 1f7b5b433bf..bebd0818087 100644 --- a/analysis/analysis-api/testData/components/callResolver/resolveCandidates/multipleCandidates/implicitInvokeWithReceiver.txt +++ b/analysis/analysis-api/testData/components/callResolver/resolveCandidates/multipleCandidates/implicitInvokeWithReceiver.txt @@ -1,5 +1,5 @@ KtInapplicableCallCandidateInfo: - diagnostic = ERROR + diagnostic = ERROR candidate = KtSimpleFunctionCall: isImplicitInvoke = false partiallyAppliedSymbol = KtPartiallyAppliedSymbol: diff --git a/analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/delegatedConstructorInapplicable.txt b/analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/delegatedConstructorInapplicable.txt index 06af937c1af..971b33d79aa 100644 --- a/analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/delegatedConstructorInapplicable.txt +++ b/analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/delegatedConstructorInapplicable.txt @@ -1,5 +1,5 @@ KtInapplicableCallCandidateInfo: - diagnostic = ERROR + diagnostic = ERROR candidate = KtDelegatedConstructorCall: kind = SUPER_CALL partiallyAppliedSymbol = KtPartiallyAppliedSymbol: diff --git a/analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/delegatedConstructorInapplicableDifferentParametersCount.txt b/analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/delegatedConstructorInapplicableDifferentParametersCount.txt index 8078c402ce9..41eee141611 100644 --- a/analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/delegatedConstructorInapplicableDifferentParametersCount.txt +++ b/analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/delegatedConstructorInapplicableDifferentParametersCount.txt @@ -1,5 +1,5 @@ KtInapplicableCallCandidateInfo: - diagnostic = ERROR + diagnostic = ERROR candidate = KtDelegatedConstructorCall: kind = SUPER_CALL partiallyAppliedSymbol = KtPartiallyAppliedSymbol: diff --git a/analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/indexedGetWithNotEnoughArgs.descriptors.txt b/analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/indexedGetWithNotEnoughArgs.descriptors.txt new file mode 100644 index 00000000000..9f996ffe12f --- /dev/null +++ b/analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/indexedGetWithNotEnoughArgs.descriptors.txt @@ -0,0 +1,39 @@ +KtInapplicableCallCandidateInfo: + diagnostic = ERROR + candidate = KtSimpleFunctionCall: + isImplicitInvoke = false + partiallyAppliedSymbol = KtPartiallyAppliedSymbol: + dispatchReceiver = KtExplicitReceiverValue: + expression = c + isSafeNavigation = false + type = C + extensionReceiver = null + signature = KtFunctionLikeSignature: + receiverType = null + returnType = kotlin.Boolean + symbol = /C.get(: C, a: kotlin.Int, b: kotlin.String): kotlin.Boolean + valueParameters = [ + KtVariableLikeSignature: + name = a + receiverType = null + returnType = kotlin.Int + symbol = a: kotlin.Int + callableIdIfNonLocal = null, + KtVariableLikeSignature: + name = b + receiverType = null + returnType = kotlin.String + symbol = b: kotlin.String + callableIdIfNonLocal = null + ] + callableIdIfNonLocal = /C.get + typeArgumentsMapping = {} + argumentMapping = { + 1 -> (KtVariableLikeSignature: + name = a + receiverType = null + returnType = kotlin.Int + symbol = a: kotlin.Int + callableIdIfNonLocal = null) + } + isInBestCandidates = true \ No newline at end of file diff --git a/analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/indexedGetWithNotEnoughArgs.txt b/analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/indexedGetWithNotEnoughArgs.txt index dd511d2bd06..856dffa33da 100644 --- a/analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/indexedGetWithNotEnoughArgs.txt +++ b/analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/indexedGetWithNotEnoughArgs.txt @@ -1,5 +1,5 @@ KtInapplicableCallCandidateInfo: - diagnostic = ERROR + diagnostic = ERROR candidate = KtSimpleFunctionCall: isImplicitInvoke = false partiallyAppliedSymbol = KtPartiallyAppliedSymbol: @@ -36,4 +36,4 @@ KtInapplicableCallCandidateInfo: symbol = a: kotlin.Int callableIdIfNonLocal = null) } - isInBestCandidates = true + isInBestCandidates = true \ No newline at end of file diff --git a/analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/indexedGetWithTooManyArgs.txt b/analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/indexedGetWithTooManyArgs.txt index 8950ad112d1..3adeafa0474 100644 --- a/analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/indexedGetWithTooManyArgs.txt +++ b/analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/indexedGetWithTooManyArgs.txt @@ -1,5 +1,5 @@ KtInapplicableCallCandidateInfo: - diagnostic = ERROR + diagnostic = ERROR candidate = KtSimpleFunctionCall: isImplicitInvoke = false partiallyAppliedSymbol = KtPartiallyAppliedSymbol: @@ -42,4 +42,4 @@ KtInapplicableCallCandidateInfo: symbol = b: kotlin.String callableIdIfNonLocal = null) } - isInBestCandidates = true + isInBestCandidates = true \ No newline at end of file diff --git a/analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/indexedSetWithNotEnoughArgs.descriptors.txt b/analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/indexedSetWithNotEnoughArgs.descriptors.txt new file mode 100644 index 00000000000..acf17ea3e8b --- /dev/null +++ b/analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/indexedSetWithNotEnoughArgs.descriptors.txt @@ -0,0 +1,51 @@ +KtInapplicableCallCandidateInfo: + diagnostic = ERROR + candidate = KtSimpleFunctionCall: + isImplicitInvoke = false + partiallyAppliedSymbol = KtPartiallyAppliedSymbol: + dispatchReceiver = KtExplicitReceiverValue: + expression = c + isSafeNavigation = false + type = C + extensionReceiver = null + signature = KtFunctionLikeSignature: + receiverType = null + returnType = kotlin.Unit + symbol = /C.set(: C, a: kotlin.Int, b: kotlin.String, value: kotlin.Boolean): kotlin.Unit + valueParameters = [ + KtVariableLikeSignature: + name = a + receiverType = null + returnType = kotlin.Int + symbol = a: kotlin.Int + callableIdIfNonLocal = null, + KtVariableLikeSignature: + name = b + receiverType = null + returnType = kotlin.String + symbol = b: kotlin.String + callableIdIfNonLocal = null, + KtVariableLikeSignature: + name = value + receiverType = null + returnType = kotlin.Boolean + symbol = value: kotlin.Boolean + callableIdIfNonLocal = null + ] + callableIdIfNonLocal = /C.set + typeArgumentsMapping = {} + argumentMapping = { + 1 -> (KtVariableLikeSignature: + name = a + receiverType = null + returnType = kotlin.Int + symbol = a: kotlin.Int + callableIdIfNonLocal = null), + false -> (KtVariableLikeSignature: + name = value + receiverType = null + returnType = kotlin.Boolean + symbol = value: kotlin.Boolean + callableIdIfNonLocal = null) + } + isInBestCandidates = true \ No newline at end of file diff --git a/analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/indexedSetWithNotEnoughArgs.txt b/analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/indexedSetWithNotEnoughArgs.txt index 63f7862a4b7..150b8434648 100644 --- a/analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/indexedSetWithNotEnoughArgs.txt +++ b/analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/indexedSetWithNotEnoughArgs.txt @@ -1,5 +1,5 @@ KtInapplicableCallCandidateInfo: - diagnostic = ERROR + diagnostic = ERROR candidate = KtSimpleFunctionCall: isImplicitInvoke = false partiallyAppliedSymbol = KtPartiallyAppliedSymbol: @@ -48,4 +48,4 @@ KtInapplicableCallCandidateInfo: symbol = value: kotlin.Boolean callableIdIfNonLocal = null) } - isInBestCandidates = true + isInBestCandidates = true \ No newline at end of file diff --git a/analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/indexedSetWithTooManyArgs.txt b/analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/indexedSetWithTooManyArgs.txt index 607ead4f624..3454904cf15 100644 --- a/analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/indexedSetWithTooManyArgs.txt +++ b/analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/indexedSetWithTooManyArgs.txt @@ -1,5 +1,5 @@ KtInapplicableCallCandidateInfo: - diagnostic = ERROR + diagnostic = ERROR candidate = KtSimpleFunctionCall: isImplicitInvoke = false partiallyAppliedSymbol = KtPartiallyAppliedSymbol: @@ -54,4 +54,4 @@ KtInapplicableCallCandidateInfo: symbol = value: kotlin.Boolean callableIdIfNonLocal = null) } - isInBestCandidates = true + isInBestCandidates = true \ No newline at end of file diff --git a/analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/privateMember.txt b/analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/privateMember.txt index 0e8103fe7c5..de9d220ad73 100644 --- a/analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/privateMember.txt +++ b/analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/privateMember.txt @@ -1,5 +1,5 @@ KtInapplicableCallCandidateInfo: - diagnostic = ERROR + diagnostic = ERROR candidate = KtSimpleFunctionCall: isImplicitInvoke = false partiallyAppliedSymbol = KtPartiallyAppliedSymbol: @@ -16,4 +16,4 @@ KtInapplicableCallCandidateInfo: callableIdIfNonLocal = /A.foo typeArgumentsMapping = {} argumentMapping = {} - isInBestCandidates = true + isInBestCandidates = true \ No newline at end of file diff --git a/analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/simpleCallWithNonMatchingArgs.txt b/analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/simpleCallWithNonMatchingArgs.txt index 15d0b7c49c2..42b67f2e3c3 100644 --- a/analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/simpleCallWithNonMatchingArgs.txt +++ b/analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/simpleCallWithNonMatchingArgs.txt @@ -1,5 +1,5 @@ KtInapplicableCallCandidateInfo: - diagnostic = ERROR + diagnostic = ERROR candidate = KtSimpleFunctionCall: isImplicitInvoke = false partiallyAppliedSymbol = KtPartiallyAppliedSymbol: @@ -13,4 +13,4 @@ KtInapplicableCallCandidateInfo: callableIdIfNonLocal = /foo typeArgumentsMapping = {} argumentMapping = {} - isInBestCandidates = true + isInBestCandidates = true \ No newline at end of file diff --git a/compiler/testData/cli/jvm/conflictingProjection.out b/compiler/testData/cli/jvm/conflictingProjection.out index 7defd1a58ba..cb6d27d371b 100644 --- a/compiler/testData/cli/jvm/conflictingProjection.out +++ b/compiler/testData/cli/jvm/conflictingProjection.out @@ -1,17 +1,17 @@ warning: language version 2.0 is experimental, there are no backwards compatibility guarantees for new language and library features -compiler/testData/cli/jvm/conflictingProjection.kt:10:19: error: projection is conflicting with variance of the corresponding type parameter of 'Out'. Remove the projection or replace it with '*' +compiler/testData/cli/jvm/conflictingProjection.kt:10:19: error: projection is conflicting with variance of the corresponding type parameter of 'Out'. Remove the projection or replace it with '*'. fun a8(value: Out) {} ^ -compiler/testData/cli/jvm/conflictingProjection.kt:17:15: error: variance annotations are only allowed for type parameters of classes and interfaces +compiler/testData/cli/jvm/conflictingProjection.kt:17:15: error: variance annotations are only allowed for type parameters of classes and interfaces. typealias A13 = In ^ -compiler/testData/cli/jvm/conflictingProjection.kt:18:15: error: variance annotations are only allowed for type parameters of classes and interfaces +compiler/testData/cli/jvm/conflictingProjection.kt:18:15: error: variance annotations are only allowed for type parameters of classes and interfaces. typealias A14 = In ^ -compiler/testData/cli/jvm/conflictingProjection.kt:19:15: error: variance annotations are only allowed for type parameters of classes and interfaces +compiler/testData/cli/jvm/conflictingProjection.kt:19:15: error: variance annotations are only allowed for type parameters of classes and interfaces. typealias A15 = In ^ -compiler/testData/cli/jvm/conflictingProjection.kt:19:26: error: projection is conflicting with variance of the corresponding type parameter of 'In'. Remove the projection or replace it with '*' +compiler/testData/cli/jvm/conflictingProjection.kt:19:26: error: projection is conflicting with variance of the corresponding type parameter of 'In'. Remove the projection or replace it with '*'. typealias A15 = In ^ COMPILATION_ERROR diff --git a/compiler/testData/cli/jvm/extendedCheckers.out b/compiler/testData/cli/jvm/extendedCheckers.out index 4deba7b9f0a..2e7da464cd0 100644 --- a/compiler/testData/cli/jvm/extendedCheckers.out +++ b/compiler/testData/cli/jvm/extendedCheckers.out @@ -1,5 +1,5 @@ warning: language version 2.0 is experimental, there are no backwards compatibility guarantees for new language and library features -compiler/testData/cli/jvm/extendedCheckers.kt:2:12: warning: redundant explicit type +compiler/testData/cli/jvm/extendedCheckers.kt:2:12: warning: redundant explicit type. val i: Int = 1 ^ OK diff --git a/compiler/testData/cli/jvm/firDeprecationJava.out b/compiler/testData/cli/jvm/firDeprecationJava.out index 28cc4f2a95d..32398173aa7 100644 --- a/compiler/testData/cli/jvm/firDeprecationJava.out +++ b/compiler/testData/cli/jvm/firDeprecationJava.out @@ -1,11 +1,11 @@ warning: language version 2.0 is experimental, there are no backwards compatibility guarantees for new language and library features -compiler/testData/cli/jvm/firDeprecationJava.kt:3:12: warning: '@Deprecated(...) fun stop(): Unit' is deprecated. Deprecated in Java +compiler/testData/cli/jvm/firDeprecationJava.kt:3:12: warning: '@Deprecated(...) fun stop(): Unit' is deprecated. Deprecated in Java. thread.stop() ^ -compiler/testData/cli/jvm/firDeprecationJava.kt:4:17: warning: '@Deprecated(...) fun bar(a: String!, b: Int, c: Double): String!' is deprecated. Deprecated in Java +compiler/testData/cli/jvm/firDeprecationJava.kt:4:17: warning: '@Deprecated(...) fun bar(a: String!, b: Int, c: Double): String!' is deprecated. Deprecated in Java. JavaClass().bar("", 1, 2.0) ^ -compiler/testData/cli/jvm/firDeprecationJava.kt:5:27: warning: '@Deprecated(...) field baz: List!' is deprecated. Deprecated in Java +compiler/testData/cli/jvm/firDeprecationJava.kt:5:27: warning: '@Deprecated(...) field baz: List!' is deprecated. Deprecated in Java. val baz = JavaClass().baz ^ OK diff --git a/compiler/testData/cli/jvm/firError.out b/compiler/testData/cli/jvm/firError.out index 6833fa95cd7..c3e85b3cbe0 100644 --- a/compiler/testData/cli/jvm/firError.out +++ b/compiler/testData/cli/jvm/firError.out @@ -1,20 +1,20 @@ warning: language version 2.0 is experimental, there are no backwards compatibility guarantees for new language and library features -compiler/testData/cli/jvm/firError.kt:1:13: error: 'val' on function parameter is not allowed +compiler/testData/cli/jvm/firError.kt:1:13: error: 'val' on function parameter is prohibited. fun println(val x: Int) {} ^ -compiler/testData/cli/jvm/firError.kt:5:13: error: variable 'x' must be initialized +compiler/testData/cli/jvm/firError.kt:5:13: error: variable 'x' must be initialized. println(x) ^ -compiler/testData/cli/jvm/firError.kt:10:16: error: public subclass exposes its private-in-file supertype 'Private' +compiler/testData/cli/jvm/firError.kt:10:16: error: subclass 'public' exposes its 'private-in-file' supertype 'Private'. class Public : Private() { ^ -compiler/testData/cli/jvm/firError.kt:10:16: error: this type is final, so it cannot be inherited from +compiler/testData/cli/jvm/firError.kt:10:16: error: this type is final, so it cannot be extended. class Public : Private() { ^ -compiler/testData/cli/jvm/firError.kt:11:5: error: property must be initialized or be abstract +compiler/testData/cli/jvm/firError.kt:11:5: error: property must be initialized or be abstract. val x: Private ^ -compiler/testData/cli/jvm/firError.kt:11:9: error: public property exposes its private-in-file type 'Private' +compiler/testData/cli/jvm/firError.kt:11:9: error: property 'public' exposes its 'private-in-file' type 'Private'. val x: Private ^ COMPILATION_ERROR diff --git a/compiler/testData/cli/jvm/firErrorOnLastLine.out b/compiler/testData/cli/jvm/firErrorOnLastLine.out index dc481ef8bcb..bc9ef983cbe 100644 --- a/compiler/testData/cli/jvm/firErrorOnLastLine.out +++ b/compiler/testData/cli/jvm/firErrorOnLastLine.out @@ -1,8 +1,8 @@ warning: language version 2.0 is experimental, there are no backwards compatibility guarantees for new language and library features -compiler/testData/cli/jvm/firErrorOnLastLine.kt:1:9: error: 'this' is not defined in this context +compiler/testData/cli/jvm/firErrorOnLastLine.kt:1:9: error: 'this' is not defined in this context. val x = this ^ -compiler/testData/cli/jvm/firErrorOnLastLine.kt:2:9: error: 'this' is not defined in this context +compiler/testData/cli/jvm/firErrorOnLastLine.kt:2:9: error: 'this' is not defined in this context. val y = this // EOL AFTER THIS LINE! ^ COMPILATION_ERROR diff --git a/compiler/testData/cli/jvm/firErrorOnLastLineNoEol.out b/compiler/testData/cli/jvm/firErrorOnLastLineNoEol.out index 6e1fee632c0..c473fb9eb30 100644 --- a/compiler/testData/cli/jvm/firErrorOnLastLineNoEol.out +++ b/compiler/testData/cli/jvm/firErrorOnLastLineNoEol.out @@ -1,8 +1,8 @@ warning: language version 2.0 is experimental, there are no backwards compatibility guarantees for new language and library features -compiler/testData/cli/jvm/firErrorOnLastLineNoEol.kt:1:9: error: 'this' is not defined in this context +compiler/testData/cli/jvm/firErrorOnLastLineNoEol.kt:1:9: error: 'this' is not defined in this context. val x = this ^ -compiler/testData/cli/jvm/firErrorOnLastLineNoEol.kt:2:9: error: 'this' is not defined in this context +compiler/testData/cli/jvm/firErrorOnLastLineNoEol.kt:2:9: error: 'this' is not defined in this context. val y = this // *NO* EOL AFTER THIS LINE! ^ COMPILATION_ERROR diff --git a/compiler/testData/cli/jvm/firFriendlyErrorIfNoJdkOptionIsSet.out b/compiler/testData/cli/jvm/firFriendlyErrorIfNoJdkOptionIsSet.out index 337dcd7d86b..d42dc2ab5aa 100644 --- a/compiler/testData/cli/jvm/firFriendlyErrorIfNoJdkOptionIsSet.out +++ b/compiler/testData/cli/jvm/firFriendlyErrorIfNoJdkOptionIsSet.out @@ -1,8 +1,8 @@ warning: language version 2.0 is experimental, there are no backwards compatibility guarantees for new language and library features -compiler/testData/cli/jvm/firFriendlyErrorIfNoJdkOptionIsSet.kt:2:11: error: unresolved reference: NullPointerException +compiler/testData/cli/jvm/firFriendlyErrorIfNoJdkOptionIsSet.kt:2:11: error: unresolved reference 'NullPointerException'. throw NullPointerException() ^ -compiler/testData/cli/jvm/firFriendlyErrorIfNoJdkOptionIsSet.kt:2:11: error: type mismatch: inferred type is 'ERROR CLASS: Unresolved name: NullPointerException' but 'kotlin/Throwable' was expected +compiler/testData/cli/jvm/firFriendlyErrorIfNoJdkOptionIsSet.kt:2:11: error: type mismatch: inferred type is 'ERROR CLASS: Unresolved name: NullPointerException', but 'kotlin/Throwable' was expected. throw NullPointerException() ^ COMPILATION_ERROR diff --git a/compiler/testData/cli/jvm/firLightTreeOff.out b/compiler/testData/cli/jvm/firLightTreeOff.out index fdbf44445fe..074f486d1e0 100644 --- a/compiler/testData/cli/jvm/firLightTreeOff.out +++ b/compiler/testData/cli/jvm/firLightTreeOff.out @@ -1,14 +1,14 @@ warning: language version 2.0 is experimental, there are no backwards compatibility guarantees for new language and library features -compiler/testData/cli/jvm/firLightTree.kt:2:5: error: variable expected +compiler/testData/cli/jvm/firLightTree.kt:2:5: error: variable expected. this += "Alpha" ^ -compiler/testData/cli/jvm/firLightTree.kt:3:15: error: classifier 'class System : Any' does not have a companion object, and thus must be initialized here +compiler/testData/cli/jvm/firLightTree.kt:3:15: error: classifier 'class System : Any' does not have a companion object, so it cannot be used as an expression. java.lang.System = null ^ -compiler/testData/cli/jvm/firLightTree.kt:3:15: error: variable expected +compiler/testData/cli/jvm/firLightTree.kt:3:15: error: variable expected. java.lang.System = null ^ -compiler/testData/cli/jvm/firLightTree.kt:3:24: error: null can not be a value of a non-null type 'kotlin/Unit' +compiler/testData/cli/jvm/firLightTree.kt:3:24: error: null cannot be a value of a non-null type 'kotlin/Unit'. java.lang.System = null ^ COMPILATION_ERROR diff --git a/compiler/testData/cli/jvm/firLightTreeOn.out b/compiler/testData/cli/jvm/firLightTreeOn.out index fdbf44445fe..074f486d1e0 100644 --- a/compiler/testData/cli/jvm/firLightTreeOn.out +++ b/compiler/testData/cli/jvm/firLightTreeOn.out @@ -1,14 +1,14 @@ warning: language version 2.0 is experimental, there are no backwards compatibility guarantees for new language and library features -compiler/testData/cli/jvm/firLightTree.kt:2:5: error: variable expected +compiler/testData/cli/jvm/firLightTree.kt:2:5: error: variable expected. this += "Alpha" ^ -compiler/testData/cli/jvm/firLightTree.kt:3:15: error: classifier 'class System : Any' does not have a companion object, and thus must be initialized here +compiler/testData/cli/jvm/firLightTree.kt:3:15: error: classifier 'class System : Any' does not have a companion object, so it cannot be used as an expression. java.lang.System = null ^ -compiler/testData/cli/jvm/firLightTree.kt:3:15: error: variable expected +compiler/testData/cli/jvm/firLightTree.kt:3:15: error: variable expected. java.lang.System = null ^ -compiler/testData/cli/jvm/firLightTree.kt:3:24: error: null can not be a value of a non-null type 'kotlin/Unit' +compiler/testData/cli/jvm/firLightTree.kt:3:24: error: null cannot be a value of a non-null type 'kotlin/Unit'. java.lang.System = null ^ COMPILATION_ERROR diff --git a/compiler/testData/cli/jvm/firSyntaxError.out b/compiler/testData/cli/jvm/firSyntaxError.out index 2287b142cb2..32d5c1e36e0 100644 --- a/compiler/testData/cli/jvm/firSyntaxError.out +++ b/compiler/testData/cli/jvm/firSyntaxError.out @@ -1,5 +1,5 @@ warning: language version 2.0 is experimental, there are no backwards compatibility guarantees for new language and library features -compiler/testData/cli/jvm/firSyntaxError.kt:1:10: error: syntax error: Expecting '}' +compiler/testData/cli/jvm/firSyntaxError.kt:1:10: error: syntax error: Expecting '}'. fun a() { ^ COMPILATION_ERROR diff --git a/compiler/testData/cli/jvm/inapplicableLateinitModifier.out b/compiler/testData/cli/jvm/inapplicableLateinitModifier.out index f8c64a84d45..ec39ef5b524 100644 --- a/compiler/testData/cli/jvm/inapplicableLateinitModifier.out +++ b/compiler/testData/cli/jvm/inapplicableLateinitModifier.out @@ -1,29 +1,29 @@ warning: language version 2.0 is experimental, there are no backwards compatibility guarantees for new language and library features -compiler/testData/cli/jvm/inapplicableLateinitModifier.kt:6:1: error: 'lateinit' modifier is not allowed on delegated properties +compiler/testData/cli/jvm/inapplicableLateinitModifier.kt:6:1: error: 'lateinit' modifier 'is not allowed on delegated properties'. lateinit var kest by Delegate ^ -compiler/testData/cli/jvm/inapplicableLateinitModifier.kt:9:5: error: 'lateinit' modifier is allowed only on mutable properties +compiler/testData/cli/jvm/inapplicableLateinitModifier.kt:9:5: error: 'lateinit' modifier 'is allowed only on mutable properties'. lateinit val fest = "10" ^ -compiler/testData/cli/jvm/inapplicableLateinitModifier.kt:9:5: error: 'lateinit' modifier is not allowed on properties with initializer +compiler/testData/cli/jvm/inapplicableLateinitModifier.kt:9:5: error: 'lateinit' modifier 'is not allowed on properties with initializer'. lateinit val fest = "10" ^ -compiler/testData/cli/jvm/inapplicableLateinitModifier.kt:11:5: error: 'lateinit' modifier is not allowed on properties of a type with nullable upper bound +compiler/testData/cli/jvm/inapplicableLateinitModifier.kt:11:5: error: 'lateinit' modifier 'is not allowed on properties of a type with nullable upper bound'. lateinit var xest: String? ^ -compiler/testData/cli/jvm/inapplicableLateinitModifier.kt:12:5: error: 'lateinit' modifier is not allowed on properties of primitive types +compiler/testData/cli/jvm/inapplicableLateinitModifier.kt:12:5: error: 'lateinit' modifier 'is not allowed on properties of primitive types'. lateinit var nest: Int ^ -compiler/testData/cli/jvm/inapplicableLateinitModifier.kt:13:5: error: 'lateinit' modifier is allowed only on mutable properties +compiler/testData/cli/jvm/inapplicableLateinitModifier.kt:13:5: error: 'lateinit' modifier 'is allowed only on mutable properties'. lateinit val dest: String ^ -compiler/testData/cli/jvm/inapplicableLateinitModifier.kt:13:5: error: 'lateinit' modifier is not allowed on properties with a custom getter or setter +compiler/testData/cli/jvm/inapplicableLateinitModifier.kt:13:5: error: 'lateinit' modifier 'is not allowed on properties with a custom getter or setter'. lateinit val dest: String ^ -compiler/testData/cli/jvm/inapplicableLateinitModifier.kt:18:5: error: 'lateinit' modifier is not allowed on properties of a type with nullable upper bound +compiler/testData/cli/jvm/inapplicableLateinitModifier.kt:18:5: error: 'lateinit' modifier 'is not allowed on properties of a type with nullable upper bound'. lateinit var best: T ^ -compiler/testData/cli/jvm/inapplicableLateinitModifier.kt:23:5: error: 'lateinit' modifier is not allowed on local variables with initializer +compiler/testData/cli/jvm/inapplicableLateinitModifier.kt:23:5: error: 'lateinit' modifier 'is not allowed on local variables with initializer'. lateinit var b: B = B() ^ COMPILATION_ERROR diff --git a/compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.out b/compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.out index 157f101f505..7cdf644c23f 100644 --- a/compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.out +++ b/compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.out @@ -1,20 +1,20 @@ warning: language version 2.0 is experimental, there are no backwards compatibility guarantees for new language and library features -compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.kt:2:26: error: cannot access '' before the instance has been initialized +compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.kt:2:26: error: cannot access '' before the instance has been initialized. constructor(x: Int = getSomeInt(), other: A = this, header: String = keker) {} ^ -compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.kt:2:51: error: cannot access '' before the instance has been initialized +compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.kt:2:51: error: cannot access '' before the instance has been initialized. constructor(x: Int = getSomeInt(), other: A = this, header: String = keker) {} ^ -compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.kt:2:74: error: cannot access '' before the instance has been initialized +compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.kt:2:74: error: cannot access '' before the instance has been initialized. constructor(x: Int = getSomeInt(), other: A = this, header: String = keker) {} ^ -compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.kt:7:20: error: 'this' is not defined in this context +compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.kt:7:20: error: 'this' is not defined in this context. class B(other: B = this) ^ -compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.kt:10:32: error: argument type mismatch: actual type is 'kotlin/Function0' but 'kotlin/Int' was expected +compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.kt:10:32: error: argument type mismatch: actual type is 'kotlin/Function0', but 'kotlin/Int' was expected. constructor(x: Int) : this({ ^ -compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.kt:12:9: error: cannot access '' before the instance has been initialized +compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.kt:12:9: error: cannot access '' before the instance has been initialized. this ^ COMPILATION_ERROR diff --git a/compiler/testData/cli/jvm/twoDiagnosticsOnSingleElement.out b/compiler/testData/cli/jvm/twoDiagnosticsOnSingleElement.out index 1089d051f47..3f9d5dc0e25 100644 --- a/compiler/testData/cli/jvm/twoDiagnosticsOnSingleElement.out +++ b/compiler/testData/cli/jvm/twoDiagnosticsOnSingleElement.out @@ -1,8 +1,8 @@ warning: language version 2.0 is experimental, there are no backwards compatibility guarantees for new language and library features -compiler/testData/cli/jvm/twoDiagnosticsOnSingleElement.kt:11:1: error: class C is not abstract and does not implement abstract member foo +compiler/testData/cli/jvm/twoDiagnosticsOnSingleElement.kt:11:1: error: 'Class C' is not abstract and does not implement abstract member 'foo'. class C : I1, I2 ^ -compiler/testData/cli/jvm/twoDiagnosticsOnSingleElement.kt:11:1: error: c inherits conflicting members: foo, foo +compiler/testData/cli/jvm/twoDiagnosticsOnSingleElement.kt:11:1: error: 'C' inherits conflicting members: foo, foo. class C : I1, I2 ^ COMPILATION_ERROR \ No newline at end of file diff --git a/compiler/testData/compileKotlinAgainstCustomBinaries/anonymousObjectTypeMetadata/output.fir.txt b/compiler/testData/compileKotlinAgainstCustomBinaries/anonymousObjectTypeMetadata/output.fir.txt index cb303cd887c..60542d43f7f 100644 --- a/compiler/testData/compileKotlinAgainstCustomBinaries/anonymousObjectTypeMetadata/output.fir.txt +++ b/compiler/testData/compileKotlinAgainstCustomBinaries/anonymousObjectTypeMetadata/output.fir.txt @@ -1,10 +1,10 @@ -compiler/testData/compileKotlinAgainstCustomBinaries/anonymousObjectTypeMetadata/anonymousObjectTypeMetadata.kt:11:10: error: cannot access 'val o3: Any': it is private in file +compiler/testData/compileKotlinAgainstCustomBinaries/anonymousObjectTypeMetadata/anonymousObjectTypeMetadata.kt:11:10: error: cannot access 'val o3: Any': it is private in file. val e1 = o3 ^ -compiler/testData/compileKotlinAgainstCustomBinaries/anonymousObjectTypeMetadata/anonymousObjectTypeMetadata.kt:12:12: error: cannot access 'val o7: Any': it is private in 'lib/W' +compiler/testData/compileKotlinAgainstCustomBinaries/anonymousObjectTypeMetadata/anonymousObjectTypeMetadata.kt:12:12: error: cannot access 'val o7: Any': it is private in 'lib/W'. val e2 = w.o7 ^ -compiler/testData/compileKotlinAgainstCustomBinaries/anonymousObjectTypeMetadata/anonymousObjectTypeMetadata.kt:13:12: error: cannot access 'val o10: Any': it is private in 'lib/O' +compiler/testData/compileKotlinAgainstCustomBinaries/anonymousObjectTypeMetadata/anonymousObjectTypeMetadata.kt:13:12: error: cannot access 'val o10: Any': it is private in 'lib/O'. val e3 = O.o10 ^ COMPILATION_ERROR diff --git a/compiler/testData/compileKotlinAgainstCustomBinaries/anonymousObjectTypeMetadataKlib/output.fir.txt b/compiler/testData/compileKotlinAgainstCustomBinaries/anonymousObjectTypeMetadataKlib/output.fir.txt index afe2d448c35..fa9d14139af 100644 --- a/compiler/testData/compileKotlinAgainstCustomBinaries/anonymousObjectTypeMetadataKlib/output.fir.txt +++ b/compiler/testData/compileKotlinAgainstCustomBinaries/anonymousObjectTypeMetadataKlib/output.fir.txt @@ -1,10 +1,10 @@ -compiler/testData/compileKotlinAgainstCustomBinaries/anonymousObjectTypeMetadataKlib/anonymousObjectTypeMetadata.kt:11:10: error: cannot access 'val o3: Any': it is private in file +compiler/testData/compileKotlinAgainstCustomBinaries/anonymousObjectTypeMetadataKlib/anonymousObjectTypeMetadata.kt:11:10: error: cannot access 'val o3: Any': it is private in file. val e1 = o3 ^ -compiler/testData/compileKotlinAgainstCustomBinaries/anonymousObjectTypeMetadataKlib/anonymousObjectTypeMetadata.kt:12:12: error: cannot access 'val o7: Any': it is private in 'lib/W' +compiler/testData/compileKotlinAgainstCustomBinaries/anonymousObjectTypeMetadataKlib/anonymousObjectTypeMetadata.kt:12:12: error: cannot access 'val o7: Any': it is private in 'lib/W'. val e2 = w.o7 ^ -compiler/testData/compileKotlinAgainstCustomBinaries/anonymousObjectTypeMetadataKlib/anonymousObjectTypeMetadata.kt:13:12: error: cannot access 'val o10: Any': it is private in 'lib/O' +compiler/testData/compileKotlinAgainstCustomBinaries/anonymousObjectTypeMetadataKlib/anonymousObjectTypeMetadata.kt:13:12: error: cannot access 'val o10: Any': it is private in 'lib/O'. val e3 = O.o10 ^ COMPILATION_ERROR diff --git a/compiler/testData/compileKotlinAgainstCustomBinaries/classFromJdkInLibrary/output.fir.txt b/compiler/testData/compileKotlinAgainstCustomBinaries/classFromJdkInLibrary/output.fir.txt new file mode 100644 index 00000000000..5439d54c126 --- /dev/null +++ b/compiler/testData/compileKotlinAgainstCustomBinaries/classFromJdkInLibrary/output.fir.txt @@ -0,0 +1,4 @@ +compiler/testData/compileKotlinAgainstCustomBinaries/classFromJdkInLibrary/source.kt:4:10: error: unresolved reference 'methodWhichDoesNotExistInJdk'. + Date.methodWhichDoesNotExistInJdk() + ^ +COMPILATION_ERROR diff --git a/compiler/testData/compileKotlinAgainstCustomBinaries/contextualDeclarationUse/output.fir.txt b/compiler/testData/compileKotlinAgainstCustomBinaries/contextualDeclarationUse/output.fir.txt new file mode 100644 index 00000000000..fe8f67fd2b0 --- /dev/null +++ b/compiler/testData/compileKotlinAgainstCustomBinaries/contextualDeclarationUse/output.fir.txt @@ -0,0 +1,16 @@ +compiler/testData/compileKotlinAgainstCustomBinaries/contextualDeclarationUse/contextualDeclarationUse.kt:6:9: error: to use contextual declarations, specify the '-Xcontext-receivers' compiler option. + f() + ^ +compiler/testData/compileKotlinAgainstCustomBinaries/contextualDeclarationUse/contextualDeclarationUse.kt:7:17: error: to use contextual declarations, specify the '-Xcontext-receivers' compiler option. + val a = A() + ^ +compiler/testData/compileKotlinAgainstCustomBinaries/contextualDeclarationUse/contextualDeclarationUse.kt:8:11: error: to use contextual declarations, specify the '-Xcontext-receivers' compiler option. + a.p + ^ +compiler/testData/compileKotlinAgainstCustomBinaries/contextualDeclarationUse/contextualDeclarationUse.kt:9:11: error: to use contextual declarations, specify the '-Xcontext-receivers' compiler option. + a.m() + ^ +compiler/testData/compileKotlinAgainstCustomBinaries/contextualDeclarationUse/contextualDeclarationUse.kt:10:9: error: to use contextual declarations, specify the '-Xcontext-receivers' compiler option. + p + ^ +COMPILATION_ERROR diff --git a/compiler/testData/compileKotlinAgainstCustomBinaries/internalFromForeignModule/output.fir.txt b/compiler/testData/compileKotlinAgainstCustomBinaries/internalFromForeignModule/output.fir.txt index b0743833602..7c5d52ba784 100644 --- a/compiler/testData/compileKotlinAgainstCustomBinaries/internalFromForeignModule/output.fir.txt +++ b/compiler/testData/compileKotlinAgainstCustomBinaries/internalFromForeignModule/output.fir.txt @@ -1,19 +1,19 @@ -compiler/testData/compileKotlinAgainstCustomBinaries/internalFromForeignModule/source.kt:3:21: error: cannot access 'interface InternalInterface : Any': it is internal in file +compiler/testData/compileKotlinAgainstCustomBinaries/internalFromForeignModule/source.kt:3:21: error: cannot access 'interface InternalInterface : Any': it is internal in file. private fun test(i: InternalInterface): InternalTypealias { ^ -compiler/testData/compileKotlinAgainstCustomBinaries/internalFromForeignModule/source.kt:3:41: error: cannot access 'typealias InternalTypealias = InternalInterface': it is internal in file +compiler/testData/compileKotlinAgainstCustomBinaries/internalFromForeignModule/source.kt:3:41: error: cannot access 'typealias InternalTypealias = InternalInterface': it is internal in file. private fun test(i: InternalInterface): InternalTypealias { ^ -compiler/testData/compileKotlinAgainstCustomBinaries/internalFromForeignModule/source.kt:4:19: error: cannot access 'fun internalMemberFun(): Unit': it is internal in 'a/PublicClass' +compiler/testData/compileKotlinAgainstCustomBinaries/internalFromForeignModule/source.kt:4:19: error: cannot access 'fun internalMemberFun(): Unit': it is internal in 'a/PublicClass'. PublicClass().internalMemberFun() ^ -compiler/testData/compileKotlinAgainstCustomBinaries/internalFromForeignModule/source.kt:5:17: error: cannot access 'companion object Companion : Any': it is internal in 'a/PublicClass' +compiler/testData/compileKotlinAgainstCustomBinaries/internalFromForeignModule/source.kt:5:17: error: cannot access 'companion object Companion : Any': it is internal in 'a/PublicClass'. PublicClass.Companion ^ -compiler/testData/compileKotlinAgainstCustomBinaries/internalFromForeignModule/source.kt:7:5: error: cannot access 'fun internalFun(s: String): String': it is internal in file +compiler/testData/compileKotlinAgainstCustomBinaries/internalFromForeignModule/source.kt:7:5: error: cannot access 'fun internalFun(s: String): String': it is internal in file. internalFun(internalVal) ^ -compiler/testData/compileKotlinAgainstCustomBinaries/internalFromForeignModule/source.kt:7:17: error: cannot access 'val internalVal: String': it is internal in file +compiler/testData/compileKotlinAgainstCustomBinaries/internalFromForeignModule/source.kt:7:17: error: cannot access 'val internalVal: String': it is internal in file. internalFun(internalVal) ^ COMPILATION_ERROR diff --git a/compiler/testData/compileKotlinAgainstCustomBinaries/jvmDefaultNonDefaultInheritanceSuperCall/output.fir.txt b/compiler/testData/compileKotlinAgainstCustomBinaries/jvmDefaultNonDefaultInheritanceSuperCall/output.fir.txt new file mode 100644 index 00000000000..27339102367 --- /dev/null +++ b/compiler/testData/compileKotlinAgainstCustomBinaries/jvmDefaultNonDefaultInheritanceSuperCall/output.fir.txt @@ -0,0 +1,4 @@ +compiler/testData/compileKotlinAgainstCustomBinaries/jvmDefaultNonDefaultInheritanceSuperCall/source.kt:5:22: error: interfaces can only call JVM-default members via super within JVM-default members. Please use '-Xjvm-default=all/all-compatibility' modes for such calls. + return super.evaluate() + ^ +COMPILATION_ERROR diff --git a/compiler/testData/compileKotlinAgainstCustomBinaries/prohibitNestedClassesByDollarName/output.fir.txt b/compiler/testData/compileKotlinAgainstCustomBinaries/prohibitNestedClassesByDollarName/output.fir.txt index c39b09946e5..515887bc2d7 100644 --- a/compiler/testData/compileKotlinAgainstCustomBinaries/prohibitNestedClassesByDollarName/output.fir.txt +++ b/compiler/testData/compileKotlinAgainstCustomBinaries/prohibitNestedClassesByDollarName/output.fir.txt @@ -1,7 +1,7 @@ -compiler/testData/compileKotlinAgainstCustomBinaries/prohibitNestedClassesByDollarName/main.kt:6:10: error: unresolved reference: Outer$Nested +compiler/testData/compileKotlinAgainstCustomBinaries/prohibitNestedClassesByDollarName/main.kt:6:10: error: unresolved reference 'Outer$Nested'. test.`Outer$Nested`() ^ -compiler/testData/compileKotlinAgainstCustomBinaries/prohibitNestedClassesByDollarName/main.kt:9:10: error: unresolved reference: JavaOuter$JavaNested +compiler/testData/compileKotlinAgainstCustomBinaries/prohibitNestedClassesByDollarName/main.kt:9:10: error: unresolved reference 'JavaOuter$JavaNested'. test.`JavaOuter$JavaNested`() ^ COMPILATION_ERROR diff --git a/compiler/testData/compileKotlinAgainstCustomBinaries/sealedInheritorInDifferentModule/output.fir.txt b/compiler/testData/compileKotlinAgainstCustomBinaries/sealedInheritorInDifferentModule/output.fir.txt new file mode 100644 index 00000000000..73cdf86bc41 --- /dev/null +++ b/compiler/testData/compileKotlinAgainstCustomBinaries/sealedInheritorInDifferentModule/output.fir.txt @@ -0,0 +1,17 @@ +warning: ATTENTION! +This build uses unsafe internal compiler arguments: + +-XXLanguage:+AllowSealedInheritorsInDifferentFilesOfSamePackage +-XXLanguage:+SealedInterfaces + +This mode is not recommended for production use, +as no stability/compatibility guarantees are given on +compiler or generated code. Use it at your own risk! + +compiler/testData/compileKotlinAgainstCustomBinaries/sealedInheritorInDifferentModule/main.kt:5:11: error: extending sealed classes or interfaces from a different module is prohibited. +class B : Base(), IBase + ^ +compiler/testData/compileKotlinAgainstCustomBinaries/sealedInheritorInDifferentModule/main.kt:5:19: error: extending sealed classes or interfaces from a different module is prohibited. +class B : Base(), IBase + ^ +COMPILATION_ERROR diff --git a/compiler/testData/diagnostics/tests/classObjects/invisibleClassObjects.fir.diag.txt b/compiler/testData/diagnostics/tests/classObjects/invisibleClassObjects.fir.diag.txt index 41db714ef04..022d2e922c7 100644 --- a/compiler/testData/diagnostics/tests/classObjects/invisibleClassObjects.fir.diag.txt +++ b/compiler/testData/diagnostics/tests/classObjects/invisibleClassObjects.fir.diag.txt @@ -1,27 +1,27 @@ -/b.kt:(96,97): error: Cannot access 'class B : Any': it is private in file +/b.kt:(96,97): error: Cannot access 'class B : Any': it is private in file. -/b.kt:(107,108): error: Cannot access 'class B : Any': it is private in file +/b.kt:(107,108): error: Cannot access 'class B : Any': it is private in file. -/b.kt:(145,154): error: Cannot access 'companion object Companion : Any': it is private in 'a/C' +/b.kt:(145,154): error: Cannot access 'companion object Companion : Any': it is private in 'a/C'. -/b.kt:(168,169): error: Cannot access 'class D : Any': it is private in file +/b.kt:(168,169): error: Cannot access 'class D : Any': it is private in file. -/b.kt:(179,180): error: Cannot access 'class D : Any': it is private in file +/b.kt:(179,180): error: Cannot access 'class D : Any': it is private in file. -/b.kt:(181,190): error: Cannot access 'companion object Companion : Any': it is private in 'a/D' +/b.kt:(181,190): error: Cannot access 'companion object Companion : Any': it is private in 'a/D'. -/b.kt:(225,226): error: Cannot access 'class B : Any': it is private in file +/b.kt:(225,226): error: Cannot access 'class B : Any': it is private in file. -/b.kt:(243,244): error: Cannot access 'class D : Any': it is private in file +/b.kt:(243,244): error: Cannot access 'class D : Any': it is private in file. -/b.kt:(263,264): error: Cannot access 'class B : Any': it is private in file +/b.kt:(263,264): error: Cannot access 'class B : Any': it is private in file. -/b.kt:(265,268): error: Cannot access 'class B : Any': it is private in file +/b.kt:(265,268): error: Cannot access 'class B : Any': it is private in file. -/b.kt:(277,280): error: Cannot access 'companion object Companion : Any': it is private in 'a/C' +/b.kt:(277,280): error: Cannot access 'companion object Companion : Any': it is private in 'a/C'. -/b.kt:(287,288): error: Cannot access 'class D : Any': it is private in file +/b.kt:(287,288): error: Cannot access 'class D : Any': it is private in file. -/b.kt:(289,293): error: Cannot access 'companion object Companion : Any': it is private in 'a/D' +/b.kt:(289,293): error: Cannot access 'companion object Companion : Any': it is private in 'a/D'. -/b.kt:(319,322): error: Cannot access 'companion object Companion : Any': it is private in 'a/C' +/b.kt:(319,322): error: Cannot access 'companion object Companion : Any': it is private in 'a/C'. diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/kt47986Default.fir.diag.txt b/compiler/testData/diagnostics/tests/inference/builderInference/kt47986Default.fir.diag.txt index 07cfb9e4816..12e619611be 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/kt47986Default.fir.diag.txt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/kt47986Default.fir.diag.txt @@ -1 +1 @@ -/kt47986Default.fir.kt:(175,183): error: Not enough information to infer type variable K +/kt47986Default.fir.kt:(175,183): error: Not enough information to infer type argument for 'K'. diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/kt47986Disabled.fir.diag.txt b/compiler/testData/diagnostics/tests/inference/builderInference/kt47986Disabled.fir.diag.txt index a42a635b780..13c2fa68694 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/kt47986Disabled.fir.diag.txt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/kt47986Disabled.fir.diag.txt @@ -1 +1 @@ -/kt47986Disabled.fir.kt:(249,257): error: Not enough information to infer type variable K +/kt47986Disabled.fir.kt:(249,257): error: Not enough information to infer type argument for 'K'. diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/kt47986_2.fir.diag.txt b/compiler/testData/diagnostics/tests/inference/builderInference/kt47986_2.fir.diag.txt index e4bfa407397..0c9c93e33e8 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/kt47986_2.fir.diag.txt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/kt47986_2.fir.diag.txt @@ -1 +1 @@ -/kt47986_2.fir.kt:(187,195): error: Not enough information to infer type variable K +/kt47986_2.fir.kt:(187,195): error: Not enough information to infer type argument for 'K'. diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/kt47986_3.fir.diag.txt b/compiler/testData/diagnostics/tests/inference/builderInference/kt47986_3.fir.diag.txt index 29ebb6107a5..6fb7b472791 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/kt47986_3.fir.diag.txt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/kt47986_3.fir.diag.txt @@ -1 +1 @@ -/kt47986_3.fir.kt:(181,189): error: Not enough information to infer type variable K +/kt47986_3.fir.kt:(181,189): error: Not enough information to infer type argument for 'K'. diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/kt51464.fir.diag.txt b/compiler/testData/diagnostics/tests/inference/builderInference/kt51464.fir.diag.txt index 9ab51535112..f488b20113c 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/kt51464.fir.diag.txt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/kt51464.fir.diag.txt @@ -1 +1 @@ -/kt51464.fir.kt:(298,307): error: Not enough information to infer type variable R +/kt51464.fir.kt:(298,307): error: Not enough information to infer type argument for 'R'. diff --git a/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461.fir.diag.txt b/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461.fir.diag.txt index 3af7c2e6769..f0060f7da9a 100644 --- a/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461.fir.diag.txt +++ b/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461.fir.diag.txt @@ -1 +1 @@ -/kt45461.kt:(245,252): warning: Type argument for a type parameter S can't be inferred because it has incompatible upper bounds: kotlin/String, kotlin/Int (multiple incompatible classes). This will become an error in Kotlin 2.0 +/kt45461.kt:(245,252): warning: Type argument for type parameter 'S' cannot be inferred because it has incompatible upper bounds: kotlin/String, kotlin/Int (multiple incompatible classes). This will become an error in Kotlin 2.0. diff --git a/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_12.fir.diag.txt b/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_12.fir.diag.txt index 72aed51a0c8..8f4b786dc72 100644 --- a/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_12.fir.diag.txt +++ b/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_12.fir.diag.txt @@ -1 +1 @@ -/kt45461_12.kt:(296,303): warning: Type argument for a type parameter S can't be inferred because it has incompatible upper bounds: kotlin/String, K (multiple incompatible classes: kotlin/String, kotlin/Number). This will become an error in Kotlin 2.0 +/kt45461_12.kt:(296,303): warning: Type argument for type parameter 'S' cannot be inferred because it has incompatible upper bounds: kotlin/String, K (multiple incompatible classes: kotlin/String, kotlin/Number). This will become an error in Kotlin 2.0. diff --git a/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_2.fir.diag.txt b/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_2.fir.diag.txt index d69d527d868..73dbf405a49 100644 --- a/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_2.fir.diag.txt +++ b/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_2.fir.diag.txt @@ -1,3 +1,3 @@ -/kt45461_2.kt:(198,201): warning: 'kotlin/Int' is a final type, and thus a value of the type parameter is predetermined +/kt45461_2.kt:(198,201): warning: Type 'kotlin/Int' is final, so the value of the type parameter is predetermined. -/kt45461_2.kt:(253,260): warning: Type argument for a type parameter S can't be inferred because it has incompatible upper bounds: kotlin/String, K (multiple incompatible classes: kotlin/String, kotlin/Int). This will become an error in Kotlin 2.0 +/kt45461_2.kt:(253,260): warning: Type argument for type parameter 'S' cannot be inferred because it has incompatible upper bounds: kotlin/String, K (multiple incompatible classes: kotlin/String, kotlin/Int). This will become an error in Kotlin 2.0. diff --git a/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_25.fir.diag.txt b/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_25.fir.diag.txt index 71dca623658..e4442459941 100644 --- a/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_25.fir.diag.txt +++ b/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_25.fir.diag.txt @@ -1,5 +1,5 @@ -/kt45461_25.fir.kt:(176,180): warning: Unchecked cast: 'kotlin/Nothing?' to 'S' +/kt45461_25.fir.kt:(176,180): warning: Unchecked cast of 'kotlin/Nothing?' to 'S'. -/kt45461_25.fir.kt:(206,209): warning: 'kotlin/Int' is a final type, and thus a value of the type parameter is predetermined +/kt45461_25.fir.kt:(206,209): warning: Type 'kotlin/Int' is final, so the value of the type parameter is predetermined. -/kt45461_25.fir.kt:(276,283): error: Type argument for a type parameter S can't be inferred because it has incompatible upper bounds: kotlin/String, K (multiple incompatible classes: kotlin/String, kotlin/Int) +/kt45461_25.fir.kt:(276,283): error: Type argument for type parameter 'S' cannot be inferred because it has incompatible upper bounds: kotlin/String, K (multiple incompatible classes: kotlin/String, kotlin/Int). diff --git a/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_26.fir.diag.txt b/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_26.fir.diag.txt index 6c90bdfaf39..f4cb7e3cdce 100644 --- a/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_26.fir.diag.txt +++ b/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_26.fir.diag.txt @@ -1,3 +1,3 @@ -/kt45461_26.fir.kt:(176,180): warning: Unchecked cast: 'kotlin/Nothing?' to 'S' +/kt45461_26.fir.kt:(176,180): warning: Unchecked cast of 'kotlin/Nothing?' to 'S'. -/kt45461_26.fir.kt:(224,232): warning: 'Out' is a final type, and thus a value of the type parameter is predetermined +/kt45461_26.fir.kt:(224,232): warning: Type 'Out' is final, so the value of the type parameter is predetermined. diff --git a/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_5.fir.diag.txt b/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_5.fir.diag.txt index ec2084ef695..6278a2b2dd8 100644 --- a/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_5.fir.diag.txt +++ b/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt45461_5.fir.diag.txt @@ -1 +1 @@ -/kt45461_5.kt:(269,276): warning: Type argument for a type parameter S can't be inferred because it has incompatible upper bounds: kotlin/String, K (multiple incompatible classes: kotlin/String, kotlin/Number). This will become an error in Kotlin 2.0 +/kt45461_5.kt:(269,276): warning: Type argument for type parameter 'S' cannot be inferred because it has incompatible upper bounds: kotlin/String, K (multiple incompatible classes: kotlin/String, kotlin/Number). This will become an error in Kotlin 2.0. diff --git a/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt48765.fir.diag.txt b/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt48765.fir.diag.txt index ba86e96236f..34d616c615c 100644 --- a/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt48765.fir.diag.txt +++ b/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt48765.fir.diag.txt @@ -1,5 +1,5 @@ -/kt48765.kt:(282,285): warning: Type argument for a type parameter T can't be inferred because it has incompatible upper bounds: kotlin/String, kotlin/Number (multiple incompatible classes). This will become an error in Kotlin 2.0 +/kt48765.kt:(282,285): warning: Type argument for type parameter 'T' cannot be inferred because it has incompatible upper bounds: kotlin/String, kotlin/Number (multiple incompatible classes). This will become an error in Kotlin 2.0. -/kt48765.kt:(345,351): warning: 'kotlin/String' is a final type, and thus a value of the type parameter is predetermined +/kt48765.kt:(345,351): warning: Type 'kotlin/String' is final, so the value of the type parameter is predetermined. -/kt48765.kt:(379,383): warning: Unchecked cast: 'kotlin/String' to 'T' +/kt48765.kt:(379,383): warning: Unchecked cast of 'kotlin/String' to 'T'. diff --git a/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt48935.fir.diag.txt b/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt48935.fir.diag.txt index ef3dec047e1..1dc58d656e5 100644 --- a/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt48935.fir.diag.txt +++ b/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt48935.fir.diag.txt @@ -1 +1 @@ -/kt48935.kt:(240,262): warning: Type argument for a type parameter T has possible incompatible upper bounds: Base, DoesNotImplementBase (final class and interface) +/kt48935.kt:(240,262): warning: Type argument for type parameter 'T' has possible incompatible upper bounds: Base, DoesNotImplementBase (final class and interface). diff --git a/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt49661.fir.diag.txt b/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt49661.fir.diag.txt index 2f97c102422..1a14910b505 100644 --- a/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt49661.fir.diag.txt +++ b/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt49661.fir.diag.txt @@ -1 +1 @@ -/kt49661.fir.kt:(243,244): warning: Type argument for a type parameter T can't be inferred because it has incompatible upper bounds: Foo, kotlin/Int (multiple incompatible classes). This will become an error in Kotlin 2.0 +/kt49661.fir.kt:(243,244): warning: Type argument for type parameter 'T' cannot be inferred because it has incompatible upper bounds: Foo, kotlin/Int (multiple incompatible classes). This will become an error in Kotlin 2.0. diff --git a/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/selectFromCovariantAndContravariantTypes.fir.diag.txt b/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/selectFromCovariantAndContravariantTypes.fir.diag.txt index 610cfa0fb0a..4260eba6554 100644 --- a/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/selectFromCovariantAndContravariantTypes.fir.diag.txt +++ b/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/selectFromCovariantAndContravariantTypes.fir.diag.txt @@ -1 +1 @@ -/selectFromCovariantAndContravariantTypes.kt:(335,344): warning: Type argument for a type parameter V can't be inferred because it has incompatible upper bounds: A, B (multiple incompatible classes). This will become an error in Kotlin 2.0 +/selectFromCovariantAndContravariantTypes.kt:(335,344): warning: Type argument for type parameter 'V' cannot be inferred because it has incompatible upper bounds: A, B (multiple incompatible classes). This will become an error in Kotlin 2.0. diff --git a/compiler/testData/diagnostics/tests/inline/nonPublicMember/kt55179.fir.diag.txt b/compiler/testData/diagnostics/tests/inline/nonPublicMember/kt55179.fir.diag.txt index bb9ab2d32ab..7626ec9b06e 100644 --- a/compiler/testData/diagnostics/tests/inline/nonPublicMember/kt55179.fir.diag.txt +++ b/compiler/testData/diagnostics/tests/inline/nonPublicMember/kt55179.fir.diag.txt @@ -1,7 +1,7 @@ -/kt55179.fir.kt:(217,223): warning: Expected performance impact from inlining is insignificant. Inlining works best for functions with parameters of functional types +/kt55179.fir.kt:(217,223): warning: Expected performance impact from inlining is insignificant. Inlining works best for functions with parameters of function types. -/kt55179.fir.kt:(240,243): error: Non-private inline function 'fun foo(): Unit' cannot access members of private classes: 'constructor(): Foo' +/kt55179.fir.kt:(240,243): error: Non-private inline function 'fun foo(): Unit' cannot access members of private class 'constructor(): Foo'. -/kt55179.fir.kt:(254,263): error: Non-private inline function 'fun foo(): Unit' cannot access members of private classes: 'companion object Companion : Any' +/kt55179.fir.kt:(254,263): error: Non-private inline function 'fun foo(): Unit' cannot access members of private class 'companion object Companion : Any'. -/kt55179.fir.kt:(272,280): error: Non-private inline function 'fun foo(): Unit' cannot access members of private classes: 'fun buildFoo(): Foo' +/kt55179.fir.kt:(272,280): error: Non-private inline function 'fun foo(): Unit' cannot access members of private class 'fun buildFoo(): Foo'. diff --git a/compiler/testData/diagnostics/tests/j+k/types/notNullTypeParameterWithKotlinNullableWarnings.fir.diag.txt b/compiler/testData/diagnostics/tests/j+k/types/notNullTypeParameterWithKotlinNullableWarnings.fir.diag.txt index 345b05c2234..da0edb581a8 100644 --- a/compiler/testData/diagnostics/tests/j+k/types/notNullTypeParameterWithKotlinNullableWarnings.fir.diag.txt +++ b/compiler/testData/diagnostics/tests/j+k/types/notNullTypeParameterWithKotlinNullableWarnings.fir.diag.txt @@ -1,7 +1,7 @@ -/main.kt:(98,103): error: Argument type mismatch: actual type is 'V' but '@EnhancedNullability V & Any' was expected +/main.kt:(98,103): error: Argument type mismatch: actual type is 'V', but '@EnhancedNullability V & Any' was expected. -/main.kt:(119,120): error: Argument type mismatch: actual type is 'kotlin/collections/List' but 'ft<@EnhancedNullability kotlin/collections/MutableList<@EnhancedNullability @R|org/jetbrains/annotations/NotNull|() V & Any>, @EnhancedNullability kotlin/collections/List<@EnhancedNullability @R|org/jetbrains/annotations/NotNull|() V & Any>>' was expected +/main.kt:(119,120): error: Argument type mismatch: actual type is 'kotlin/collections/List', but 'ft<@EnhancedNullability kotlin/collections/MutableList<@EnhancedNullability @R|org/jetbrains/annotations/NotNull|() V & Any>, @EnhancedNullability kotlin/collections/List<@EnhancedNullability @R|org/jetbrains/annotations/NotNull|() V & Any>>' was expected. -/main.kt:(133,138): error: Argument type mismatch: actual type is 'V' but '@EnhancedNullability E & Any' was expected +/main.kt:(133,138): error: Argument type mismatch: actual type is 'V', but '@EnhancedNullability E & Any' was expected. -/main.kt:(154,155): error: Argument type mismatch: actual type is 'kotlin/collections/List' but 'ft<@EnhancedNullability kotlin/collections/MutableList<@EnhancedNullability @R|org/jetbrains/annotations/NotNull|() E & Any>, @EnhancedNullability kotlin/collections/List<@EnhancedNullability @R|org/jetbrains/annotations/NotNull|() E & Any>>' was expected +/main.kt:(154,155): error: Argument type mismatch: actual type is 'kotlin/collections/List', but 'ft<@EnhancedNullability kotlin/collections/MutableList<@EnhancedNullability @R|org/jetbrains/annotations/NotNull|() E & Any>, @EnhancedNullability kotlin/collections/List<@EnhancedNullability @R|org/jetbrains/annotations/NotNull|() E & Any>>' was expected. diff --git a/compiler/testData/diagnostics/tests/j+k/types/notNullTypeParameterWithKotlinOverridesDefinitelyNonNullable.fir.diag.txt b/compiler/testData/diagnostics/tests/j+k/types/notNullTypeParameterWithKotlinOverridesDefinitelyNonNullable.fir.diag.txt index 788db7807c8..2a5bba7c272 100644 --- a/compiler/testData/diagnostics/tests/j+k/types/notNullTypeParameterWithKotlinOverridesDefinitelyNonNullable.fir.diag.txt +++ b/compiler/testData/diagnostics/tests/j+k/types/notNullTypeParameterWithKotlinOverridesDefinitelyNonNullable.fir.diag.txt @@ -1,3 +1,3 @@ -/main.kt:(72,80): error: 'takeV' overrides nothing +/main.kt:(72,80): error: 'takeV' overrides nothing. -/main.kt:(137,145): error: 'takeVList' overrides nothing +/main.kt:(137,145): error: 'takeVList' overrides nothing. diff --git a/compiler/testData/diagnostics/tests/multiplatform/annotationMatching/checkDiagnosticFullText.fir.diag.txt b/compiler/testData/diagnostics/tests/multiplatform/annotationMatching/checkDiagnosticFullText.fir.diag.txt index 50ce2a25516..6ff2f0b4ef3 100644 --- a/compiler/testData/diagnostics/tests/multiplatform/annotationMatching/checkDiagnosticFullText.fir.diag.txt +++ b/compiler/testData/diagnostics/tests/multiplatform/annotationMatching/checkDiagnosticFullText.fir.diag.txt @@ -1,11 +1,11 @@ /jvm.kt:(86,93): warning: Annotation `@Ann()` is missing on actual declaration. -All annotations from expect `class OnClass : Any` must be present with the same arguments on actual `class OnClass : Any`, otherwise they might behave incorrectly. +All annotations from expect 'class OnClass : Any' must be present with the same arguments on actual 'class OnClass : Any', otherwise they might behave incorrectly. /jvm.kt:(134,142): warning: Annotation `@Ann()` is missing on actual declaration. -All annotations from expect `fun onMember(): Unit` must be present with the same arguments on actual `fun onMember(): Unit`, otherwise they might behave incorrectly. +All annotations from expect 'fun onMember(): Unit' must be present with the same arguments on actual 'fun onMember(): Unit', otherwise they might behave incorrectly. /jvm.kt:(213,225): warning: Annotation `@Ann()` is missing on actual declaration. -All annotations from expect `class ViaTypealias : Any` must be present with the same arguments on actual `class ViaTypealiasImpl : Any`, otherwise they might behave incorrectly. +All annotations from expect 'class ViaTypealias : Any' must be present with the same arguments on actual 'class ViaTypealiasImpl : Any', otherwise they might behave incorrectly. /jvm.kt:(279,295): warning: Annotation `@WithArg(s = String(str))` has different arguments on actual declaration: `@WithArg(s = String(other str))`. -All annotations from expect `fun withDifferentArg(): Unit` must be present with the same arguments on actual `fun withDifferentArg(): Unit`, otherwise they might behave incorrectly. +All annotations from expect 'fun withDifferentArg(): Unit' must be present with the same arguments on actual 'fun withDifferentArg(): Unit', otherwise they might behave incorrectly. diff --git a/compiler/testData/diagnostics/tests/senselessComparison/complexExpression.fir.diag.txt b/compiler/testData/diagnostics/tests/senselessComparison/complexExpression.fir.diag.txt index b7cbd33d46c..b0e6635c677 100644 --- a/compiler/testData/diagnostics/tests/senselessComparison/complexExpression.fir.diag.txt +++ b/compiler/testData/diagnostics/tests/senselessComparison/complexExpression.fir.diag.txt @@ -1 +1 @@ -/complexExpression.fir.kt:(75,121): warning: Condition is always 'false' +/complexExpression.fir.kt:(75,121): warning: Condition is always 'false'. diff --git a/compiler/testData/diagnostics/tests/smartCasts/smartCastOnAlienPropertyFromInvisibleClass.fir.diag.txt b/compiler/testData/diagnostics/tests/smartCasts/smartCastOnAlienPropertyFromInvisibleClass.fir.diag.txt index c80547a840a..ed26888e901 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/smartCastOnAlienPropertyFromInvisibleClass.fir.diag.txt +++ b/compiler/testData/diagnostics/tests/smartCasts/smartCastOnAlienPropertyFromInvisibleClass.fir.diag.txt @@ -1,3 +1,3 @@ -/B.kt:(133,134): error: Smart cast to 'kotlin/String' is impossible, because 'x' is a public API property declared in different module +/B.kt:(133,134): error: Smart cast to 'kotlin/String' is impossible, because 'x' is a public API property declared in different module. -/B.kt:(265,268): error: Smart cast to 'kotlin/String' is impossible, because 'x' is a public API property declared in different module +/B.kt:(265,268): error: Smart cast to 'kotlin/String' is impossible, because 'x' is a public API property declared in different module. diff --git a/compiler/testData/diagnostics/testsWithStdLib/contracts/dsl/errors/notFirstStatement.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/contracts/dsl/errors/notFirstStatement.fir.kt index e7c90013406..8cb12b0a642 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/contracts/dsl/errors/notFirstStatement.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/contracts/dsl/errors/notFirstStatement.fir.kt @@ -7,7 +7,7 @@ import kotlin.contracts.* fun foo(y: Boolean) { val x: Int = 42 - contract { + contract { returns() implies y } } @@ -23,14 +23,14 @@ inline fun case1(block: () -> Unit) { block() } -inline fun case_2(block: () -> Unit) = contract { +inline fun case_2(block: () -> Unit) = contract { callsInPlace(block, InvocationKind.EXACTLY_ONCE) } fun case_3(block: () -> Unit) { class Class { fun innerFun(block2: () -> Unit) { - contract { + contract { callsInPlace(block2, InvocationKind.EXACTLY_ONCE) } block2() diff --git a/compiler/testData/diagnostics/testsWithStdLib/labelClashes.fir.diag.txt b/compiler/testData/diagnostics/testsWithStdLib/labelClashes.fir.diag.txt index 4e8edb536b5..d90e57274af 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/labelClashes.fir.diag.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/labelClashes.fir.diag.txt @@ -1,7 +1,7 @@ -/labelClashes.fir.kt:(84,87): error: Unresolved reference: inc +/labelClashes.fir.kt:(84,87): error: Unresolved reference 'inc'. -/labelClashes.fir.kt:(151,154): error: Unresolved reference: inc +/labelClashes.fir.kt:(151,154): error: Unresolved reference 'inc'. -/labelClashes.fir.kt:(268,271): error: Unresolved reference: foo +/labelClashes.fir.kt:(268,271): error: Unresolved reference 'foo'. -/labelClashes.fir.kt:(331,334): error: Unresolved reference: foo +/labelClashes.fir.kt:(331,334): error: Unresolved reference 'foo'. diff --git a/compiler/testData/diagnostics/testsWithStdLib/typealias/upperBoundViolated2.fir.diag.txt b/compiler/testData/diagnostics/testsWithStdLib/typealias/upperBoundViolated2.fir.diag.txt index 601ddb7c844..b206278568f 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/typealias/upperBoundViolated2.fir.diag.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/typealias/upperBoundViolated2.fir.diag.txt @@ -1 +1 @@ -/upperBoundViolated2.fir.kt:(111,123): error: Type argument is not within its bounds: should be subtype of 'kotlin/collections/List' +/upperBoundViolated2.fir.kt:(111,123): error: Type argument is not within its bounds: should be subtype of 'kotlin/collections/List'. diff --git a/compiler/testData/javaModules/jdkModulesFromNamed/main.fir.txt b/compiler/testData/javaModules/jdkModulesFromNamed/main.fir.txt index 518b11c4d34..e7301ec5401 100644 --- a/compiler/testData/javaModules/jdkModulesFromNamed/main.fir.txt +++ b/compiler/testData/javaModules/jdkModulesFromNamed/main.fir.txt @@ -1,4 +1,4 @@ -compiler/testData/javaModules/jdkModulesFromNamed/main/test.kt:11:12: error: unresolved reference: javax.swing.JFrame +compiler/testData/javaModules/jdkModulesFromNamed/main/test.kt:11:12: error: unresolved reference 'javax.swing.JFrame'. val s: javax.swing.JFrame? = null ^ compiler/testData/javaModules/jdkModulesFromNamed/main/test.kt:12:5: error: overload resolution ambiguity between candidates: [@InlineOnly() fun println(message: Any?): Unit, @InlineOnly() fun println(message: Boolean): Unit, @InlineOnly() fun println(message: Byte): Unit, ...] diff --git a/compiler/testData/javaModules/releaseFlag/moduleSwing.fir.txt b/compiler/testData/javaModules/releaseFlag/moduleSwing.fir.txt index 1c1b69455c3..c0a66ae96e0 100644 --- a/compiler/testData/javaModules/releaseFlag/moduleSwing.fir.txt +++ b/compiler/testData/javaModules/releaseFlag/moduleSwing.fir.txt @@ -1,4 +1,4 @@ -compiler/testData/javaModules/releaseFlag/moduleSwing/foo/Foo.kt:5:12: error: unresolved reference: javax.swing.JFrame +compiler/testData/javaModules/releaseFlag/moduleSwing/foo/Foo.kt:5:12: error: unresolved reference 'javax.swing.JFrame'. val z: javax.swing.JFrame? = null ^ COMPILATION_ERROR diff --git a/compiler/testData/javaModules/severalModulesWithTheSameName/main.fir.txt b/compiler/testData/javaModules/severalModulesWithTheSameName/main.fir.txt new file mode 100644 index 00000000000..7be623ba534 --- /dev/null +++ b/compiler/testData/javaModules/severalModulesWithTheSameName/main.fir.txt @@ -0,0 +1,11 @@ +$TMP_DIR$/dependency2.jar: warning: the root is ignored because a module with the same name 'dependency' has been found earlier on the module path at: $TMP_DIR$/dependency1.jar +compiler/testData/javaModules/severalModulesWithTheSameName/main/usage.kt:2:8: error: unresolved reference 'bar'. +import bar.Bar + ^ +compiler/testData/javaModules/severalModulesWithTheSameName/main/usage.kt:6:12: error: unresolved reference 'Bar'. + val b: Bar = Bar() + ^ +compiler/testData/javaModules/severalModulesWithTheSameName/main/usage.kt:6:18: error: unresolved reference 'Bar'. + val b: Bar = Bar() + ^ +COMPILATION_ERROR diff --git a/compiler/testData/javaModules/unnamedDoesNotReadNotAdded/moduleB.fir.txt b/compiler/testData/javaModules/unnamedDoesNotReadNotAdded/moduleB.fir.txt new file mode 100644 index 00000000000..308f41d9c60 --- /dev/null +++ b/compiler/testData/javaModules/unnamedDoesNotReadNotAdded/moduleB.fir.txt @@ -0,0 +1,7 @@ +compiler/testData/javaModules/unnamedDoesNotReadNotAdded/moduleB/usage.kt:1:8: error: unresolved reference 'foo'. +import foo.Foo + ^ +compiler/testData/javaModules/unnamedDoesNotReadNotAdded/moduleB/usage.kt:4:5: error: unresolved reference 'Foo'. + Foo() + ^ +COMPILATION_ERROR diff --git a/libraries/scripting/jvm-host-test/test/kotlin/script/experimental/jvmhost/test/ScriptingHostTest.kt b/libraries/scripting/jvm-host-test/test/kotlin/script/experimental/jvmhost/test/ScriptingHostTest.kt index 98afa56a30d..73635f10b81 100644 --- a/libraries/scripting/jvm-host-test/test/kotlin/script/experimental/jvmhost/test/ScriptingHostTest.kt +++ b/libraries/scripting/jvm-host-test/test/kotlin/script/experimental/jvmhost/test/ScriptingHostTest.kt @@ -468,7 +468,8 @@ class ScriptingHostTest : TestCase() { compilerOptions("-no-stdlib") } assertTrue(res1 is ResultWithDiagnostics.Failure) - res1.reports.find { it.message.startsWith("Unresolved reference: println") } + val regex = "Unresolved reference\\W+println".toRegex() + res1.reports.find { it.message.contains(regex) } ?: fail("Expected unresolved reference report. Reported:\n ${res1.reports.joinToString("\n ") { it.message }}") val res2 = evalScriptWithConfiguration(script) { diff --git a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/EnumEntriesWithOutdatedStdlibTest.kt b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/EnumEntriesWithOutdatedStdlibTest.kt index d76f337b0fe..197254a7f14 100644 --- a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/EnumEntriesWithOutdatedStdlibTest.kt +++ b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/EnumEntriesWithOutdatedStdlibTest.kt @@ -27,8 +27,8 @@ class EnumEntriesWithOutdatedStdlibTest : KGPBaseTest() { buildGradleKts.replaceText("\"1.9\" // ", "\"2.0\" // ") buildAndFail(":compileKotlin") { - assertOutputContains("Main.kt:13:20 Unresolved reference: entries") - assertOutputContains("Main.kt:14:30 Unresolved reference: entries") + assertOutputContains("Main.kt:13:20 Unresolved reference 'entries'.") + assertOutputContains("Main.kt:14:30 Unresolved reference 'entries'.") } } } diff --git a/libraries/tools/kotlin-main-kts-test/test/org/jetbrains/kotlin/mainKts/test/mainKtsTest.kt b/libraries/tools/kotlin-main-kts-test/test/org/jetbrains/kotlin/mainKts/test/mainKtsTest.kt index 76a3bf3b70e..378b01dc5bf 100644 --- a/libraries/tools/kotlin-main-kts-test/test/org/jetbrains/kotlin/mainKts/test/mainKtsTest.kt +++ b/libraries/tools/kotlin-main-kts-test/test/org/jetbrains/kotlin/mainKts/test/mainKtsTest.kt @@ -72,7 +72,7 @@ class MainKtsTest { val resErr = evalFile(File("$TEST_DATA_ROOT/resolve-error-hamcrest-via-junit.main.kts")) Assert.assertTrue( resErr is ResultWithDiagnostics.Failure && - resErr.reports.any { it.message == "Unresolved reference: hamcrest" } + resErr.reports.any { it.message.contains("Unresolved reference") && it.message.contains("hamcrest") } ) } @@ -299,10 +299,15 @@ class MainKtsTest { "test failed - expecting a failure$expected but received " + (if (res is ResultWithDiagnostics.Failure) "failure" else "success") + ":\n ${reports.joinToString("\n ")}", - res is ResultWithDiagnostics.Failure && reports.any { report -> expectedErrors.any { report.contains(it) } } + res is ResultWithDiagnostics.Failure && reports.any { report -> expectedErrors.any { report.containsIgnoringPunctuation(it) } } ) } + private val regexNonWord = "\\W".toRegex() + private fun String.containsIgnoringPunctuation(it: String): Boolean { + return this.replace(regexNonWord, "").contains(it.replace(regexNonWord, "")) + } + private fun evalSuccessWithOut(scriptFile: File, cacheDir: File? = null): List = captureOut { val res = evalFile(scriptFile, cacheDir) diff --git a/libraries/tools/kotlin-maven-plugin-test/src/it/test-customJdk/verify.bsh b/libraries/tools/kotlin-maven-plugin-test/src/it/test-customJdk/verify.bsh index 7b8644903f5..a62defce8a0 100644 --- a/libraries/tools/kotlin-maven-plugin-test/src/it/test-customJdk/verify.bsh +++ b/libraries/tools/kotlin-maven-plugin-test/src/it/test-customJdk/verify.bsh @@ -5,12 +5,17 @@ assertBuildLogHasNoLineThatContains("AutoCloseable"); int line1 = findBuildLogLineThatContains("Unresolved reference: stream"); int line2 = findBuildLogLineThatContains("Unresolved reference: java.util.stream.Stream"); +int line1K2 = findBuildLogLineThatContains("Unresolved reference 'stream'"); +int line2K2 = findBuildLogLineThatContains("Unresolved reference 'java.util.stream.Stream'"); if (line1 >= 0) { print("Expected content \"Unresolved reference: stream\" was found at line " + (line1+1) + " of build log: \"" + buildLog[line1] + "\""); - } else if (line2 >= 0) { print("Expected content \"Unresolved reference: java.util.stream.Stream\" was found at line " + (line2+1) + " of build log: \"" + buildLog[line2] + "\""); +} else if (line1K2 >= 0) { + print("Expected content \"Unresolved reference 'stream'\" was found at line " + (line1K2+1) + " of build log: \"" + buildLog[line1K2] + "\""); +} else if (line2K2 >= 0) { + print("Expected content \"Unresolved reference 'java.util.stream.Stream'\" was found at line " + (line2K2+1) + " of build log: \"" + buildLog[line2K2] + "\""); } else { throw new Exception("Expected build log to contain: \"Unresolved reference: stream\" or \"Unresolved reference: java.util.stream.Stream\""); } \ No newline at end of file diff --git a/plugins/assign-plugin/testData/diagnostics/incorrectUsage.fir.diag.txt b/plugins/assign-plugin/testData/diagnostics/incorrectUsage.fir.diag.txt index 542bd366c0a..f12057bd9cc 100644 --- a/plugins/assign-plugin/testData/diagnostics/incorrectUsage.fir.diag.txt +++ b/plugins/assign-plugin/testData/diagnostics/incorrectUsage.fir.diag.txt @@ -1,7 +1,7 @@ -/incorrectUsage.fir.kt:(390,395): error: None of the following functions are applicable: [fun assign(v: String): Unit, fun assign(v: StringProperty): Unit] +/incorrectUsage.fir.kt:(390,395): error: None of the following functions is applicable: [fun assign(v: String): Unit, fun assign(v: StringProperty): Unit] /incorrectUsage.fir.kt:(396,397): error: -/incorrectUsage.fir.kt:(536,541): error: None of the following functions are applicable: [fun assign(v: String): Unit, fun assign(v: StringProperty): Unit] +/incorrectUsage.fir.kt:(536,541): error: None of the following functions is applicable: [fun assign(v: String): Unit, fun assign(v: StringProperty): Unit] /incorrectUsage.fir.kt:(542,543): error: diff --git a/plugins/assign-plugin/testData/diagnostics/localVariables.fir.diag.txt b/plugins/assign-plugin/testData/diagnostics/localVariables.fir.diag.txt index 73cb346ae6c..10fe0e6c101 100644 --- a/plugins/assign-plugin/testData/diagnostics/localVariables.fir.diag.txt +++ b/plugins/assign-plugin/testData/diagnostics/localVariables.fir.diag.txt @@ -1,13 +1,13 @@ -/localVariables.fir.kt:(401,409): error: Val cannot be reassigned +/localVariables.fir.kt:(401,409): error: 'val' cannot be reassigned. -/localVariables.fir.kt:(412,418): error: Assignment type mismatch: actual type is 'kotlin/String' but 'StringProperty' was expected +/localVariables.fir.kt:(412,418): error: Assignment type mismatch: actual type is 'kotlin/String', but 'StringProperty' was expected. -/localVariables.fir.kt:(521,529): error: Val cannot be reassigned +/localVariables.fir.kt:(521,529): error: 'val' cannot be reassigned. -/localVariables.fir.kt:(673,679): error: Assignment type mismatch: actual type is 'kotlin/String' but 'StringProperty' was expected +/localVariables.fir.kt:(673,679): error: Assignment type mismatch: actual type is 'kotlin/String', but 'StringProperty' was expected. -/localVariables.fir.kt:(917,925): error: Val cannot be reassigned +/localVariables.fir.kt:(917,925): error: 'val' cannot be reassigned. -/localVariables.fir.kt:(928,934): error: Assignment type mismatch: actual type is 'kotlin/String' but 'StringProperty' was expected +/localVariables.fir.kt:(928,934): error: Assignment type mismatch: actual type is 'kotlin/String', but 'StringProperty' was expected. -/localVariables.fir.kt:(995,1003): error: Val cannot be reassigned +/localVariables.fir.kt:(995,1003): error: 'val' cannot be reassigned. diff --git a/plugins/assign-plugin/testData/diagnostics/methodDeclaration.fir.diag.txt b/plugins/assign-plugin/testData/diagnostics/methodDeclaration.fir.diag.txt index f1062134375..bff1b95fe6a 100644 --- a/plugins/assign-plugin/testData/diagnostics/methodDeclaration.fir.diag.txt +++ b/plugins/assign-plugin/testData/diagnostics/methodDeclaration.fir.diag.txt @@ -8,6 +8,6 @@ /methodDeclaration.fir.kt:(594,595): error: -/methodDeclaration.fir.kt:(870,875): error: Val cannot be reassigned +/methodDeclaration.fir.kt:(870,875): error: 'val' cannot be reassigned. -/methodDeclaration.fir.kt:(878,880): error: Assignment type mismatch: actual type is 'kotlin/Int' but '/IntProperty' was expected +/methodDeclaration.fir.kt:(878,880): error: Assignment type mismatch: actual type is 'kotlin/Int', but '/IntProperty' was expected. diff --git a/plugins/assign-plugin/testData/diagnostics/noAnnotation.fir.diag.txt b/plugins/assign-plugin/testData/diagnostics/noAnnotation.fir.diag.txt index d53442267e4..067158246ac 100644 --- a/plugins/assign-plugin/testData/diagnostics/noAnnotation.fir.diag.txt +++ b/plugins/assign-plugin/testData/diagnostics/noAnnotation.fir.diag.txt @@ -1,19 +1,19 @@ -/noAnnotation.fir.kt:(424,429): error: Val cannot be reassigned +/noAnnotation.fir.kt:(424,429): error: 'val' cannot be reassigned. -/noAnnotation.fir.kt:(432,436): error: Assignment type mismatch: actual type is 'kotlin/String' but 'StringProperty' was expected +/noAnnotation.fir.kt:(432,436): error: Assignment type mismatch: actual type is 'kotlin/String', but 'StringProperty' was expected. -/noAnnotation.fir.kt:(446,451): error: Val cannot be reassigned +/noAnnotation.fir.kt:(446,451): error: 'val' cannot be reassigned. -/noAnnotation.fir.kt:(500,505): error: Val cannot be reassigned +/noAnnotation.fir.kt:(500,505): error: 'val' cannot be reassigned. -/noAnnotation.fir.kt:(508,512): error: Assignment type mismatch: actual type is 'kotlin/String' but 'StringProperty' was expected +/noAnnotation.fir.kt:(508,512): error: Assignment type mismatch: actual type is 'kotlin/String', but 'StringProperty' was expected. -/noAnnotation.fir.kt:(544,549): error: Val cannot be reassigned +/noAnnotation.fir.kt:(544,549): error: 'val' cannot be reassigned. -/noAnnotation.fir.kt:(588,593): error: Val cannot be reassigned +/noAnnotation.fir.kt:(588,593): error: 'val' cannot be reassigned. -/noAnnotation.fir.kt:(596,598): error: Assignment type mismatch: actual type is 'kotlin/Int' but 'StringProperty' was expected +/noAnnotation.fir.kt:(596,598): error: Assignment type mismatch: actual type is 'kotlin/Int', but 'StringProperty' was expected. -/noAnnotation.fir.kt:(624,629): error: Val cannot be reassigned +/noAnnotation.fir.kt:(624,629): error: 'val' cannot be reassigned. -/noAnnotation.fir.kt:(632,634): error: Assignment type mismatch: actual type is 'kotlin/Int' but 'StringProperty' was expected +/noAnnotation.fir.kt:(632,634): error: Assignment type mismatch: actual type is 'kotlin/Int', but 'StringProperty' was expected. diff --git a/plugins/assign-plugin/testData/diagnostics/otherOperators.fir.diag.txt b/plugins/assign-plugin/testData/diagnostics/otherOperators.fir.diag.txt index 47815b4fd3d..37510c71761 100644 --- a/plugins/assign-plugin/testData/diagnostics/otherOperators.fir.diag.txt +++ b/plugins/assign-plugin/testData/diagnostics/otherOperators.fir.diag.txt @@ -1,37 +1,37 @@ -/otherOperators.fir.kt:(456,458): error: Unresolved reference: plusAssign +/otherOperators.fir.kt:(456,458): error: Unresolved reference 'plusAssign'. -/otherOperators.fir.kt:(502,504): error: Unresolved reference: plusAssign +/otherOperators.fir.kt:(502,504): error: Unresolved reference 'plusAssign'. -/otherOperators.fir.kt:(560,562): error: Unresolved reference: compareTo +/otherOperators.fir.kt:(560,562): error: Unresolved reference 'compareTo'. -/otherOperators.fir.kt:(606,608): error: Unresolved reference: compareTo +/otherOperators.fir.kt:(606,608): error: Unresolved reference 'compareTo'. -/otherOperators.fir.kt:(664,666): error: Unresolved reference: compareTo +/otherOperators.fir.kt:(664,666): error: Unresolved reference 'compareTo'. -/otherOperators.fir.kt:(710,712): error: Unresolved reference: compareTo +/otherOperators.fir.kt:(710,712): error: Unresolved reference 'compareTo'. -/otherOperators.fir.kt:(769,772): error: No set method providing array access +/otherOperators.fir.kt:(769,772): error: No 'set' operator method providing array access. -/otherOperators.fir.kt:(817,820): error: No set method providing array access +/otherOperators.fir.kt:(817,820): error: No 'set' operator method providing array access. -/otherOperators.fir.kt:(882,888): error: No set method providing array access +/otherOperators.fir.kt:(882,888): error: No 'set' operator method providing array access. -/otherOperators.fir.kt:(933,939): error: No set method providing array access +/otherOperators.fir.kt:(933,939): error: No 'set' operator method providing array access. -/otherOperators.fir.kt:(1003,1012): error: No set method providing array access +/otherOperators.fir.kt:(1003,1012): error: No 'set' operator method providing array access. -/otherOperators.fir.kt:(1057,1066): error: No set method providing array access +/otherOperators.fir.kt:(1057,1066): error: No 'set' operator method providing array access. -/otherOperators.fir.kt:(1128,1129): error: Too many arguments for public final fun /StringProperty.get(): kotlin/String +/otherOperators.fir.kt:(1128,1129): error: Too many arguments for 'public final fun /StringProperty.get(): kotlin/String'. -/otherOperators.fir.kt:(1131,1133): error: Unresolved reference: += +/otherOperators.fir.kt:(1131,1133): error: Unresolved reference '+='. -/otherOperators.fir.kt:(1177,1178): error: Too many arguments for public final fun /StringProperty.get(): kotlin/String +/otherOperators.fir.kt:(1177,1178): error: Too many arguments for 'public final fun /StringProperty.get(): kotlin/String'. -/otherOperators.fir.kt:(1180,1182): error: Unresolved reference: += +/otherOperators.fir.kt:(1180,1182): error: Unresolved reference '+='. -/otherOperators.fir.kt:(1325,1328): error: No set method providing array access +/otherOperators.fir.kt:(1325,1328): error: No 'set' operator method providing array access. -/otherOperators.fir.kt:(1431,1437): error: Variable expected +/otherOperators.fir.kt:(1431,1437): error: Variable expected. -/otherOperators.fir.kt:(1477,1483): error: Variable expected +/otherOperators.fir.kt:(1477,1483): error: Variable expected. diff --git a/plugins/assign-plugin/testData/diagnostics/plusAssignPrecedence.fir.diag.txt b/plugins/assign-plugin/testData/diagnostics/plusAssignPrecedence.fir.diag.txt index 620e688dc0e..1681f13679a 100644 --- a/plugins/assign-plugin/testData/diagnostics/plusAssignPrecedence.fir.diag.txt +++ b/plugins/assign-plugin/testData/diagnostics/plusAssignPrecedence.fir.diag.txt @@ -1,5 +1,5 @@ -/plusAssignPrecedence.fir.kt:(2202,2204): error: Unresolved reference: plusAssign +/plusAssignPrecedence.fir.kt:(2202,2204): error: Unresolved reference 'plusAssign'. -/plusAssignPrecedence.fir.kt:(2227,2229): error: Unresolved reference: plusAssign +/plusAssignPrecedence.fir.kt:(2227,2229): error: Unresolved reference 'plusAssign'. /plusAssignPrecedence.fir.kt:(2308,2310): error: Ambiguity between assign operator candidates: [fun plus(v: String): StringPropertyWithPlusAndPlusAssign, fun plusAssign(v: String): Unit] diff --git a/plugins/scripting/scripting-compiler/tests/org/jetbrains/kotlin/scripting/compiler/plugin/ScriptingWithCliCompilerTest.kt b/plugins/scripting/scripting-compiler/tests/org/jetbrains/kotlin/scripting/compiler/plugin/ScriptingWithCliCompilerTest.kt index 9b701ac73f2..02d56a816d0 100644 --- a/plugins/scripting/scripting-compiler/tests/org/jetbrains/kotlin/scripting/compiler/plugin/ScriptingWithCliCompilerTest.kt +++ b/plugins/scripting/scripting-compiler/tests/org/jetbrains/kotlin/scripting/compiler/plugin/ScriptingWithCliCompilerTest.kt @@ -75,7 +75,7 @@ class ScriptingWithCliCompilerTest { ), expectedExitCode = 1, expectedSomeErrPatterns = listOf( - "unresolved reference: CompilerOptions" + "unresolved reference\\W*CompilerOptions" ), ) runWithK2JVMCompiler(