From 93563d7c80bccd3fc884f1c032a43f177886a3a9 Mon Sep 17 00:00:00 2001 From: Dmitriy Novozhilov Date: Mon, 11 Dec 2023 13:21:32 +0200 Subject: [PATCH] [FIR] Report PROPERTY_AS_OPERATOR for all operator conventions ^KT-62347 Fixed ^KT-59715 Fixed --- ...LFirBlackBoxCodegenBasedTestGenerated.java | 6 ----- ...rsedBlackBoxCodegenBasedTestGenerated.java | 6 ----- .../FirConventionFunctionCallChecker.kt | 5 ---- ...LightTreeBlackBoxCodegenTestGenerated.java | 6 ----- ...hIrFakeOverrideGeneratorTestGenerated.java | 6 ----- .../FirPsiBlackBoxCodegenTestGenerated.java | 6 ----- .../fir/resolve/calls/CandidateFactory.kt | 13 ++++++++--- ...rCallCompletionResultsWriterTransformer.kt | 10 ++++---- .../fir/resolve/calls/ResolutionDiagnostic.kt | 6 ++--- .../box/delegatedProperty/withInvoke.kt | 17 -------------- .../delegatedProperty/withInvokes.fir.kt | 6 ++--- .../PropertyInvoke.fir.kt | 2 +- .../destructuringDeclarationWithInvoke.fir.kt | 23 ------------------- .../destructuringDeclarationWithInvoke.kt | 1 + .../IrBlackBoxCodegenTestGenerated.java | 6 ----- ...kBoxCodegenWithIrInlinerTestGenerated.java | 6 ----- .../LightAnalysisModeTestGenerated.java | 5 ---- .../operator-call/p-4/neg/1.1.fir.kt | 4 ++-- 18 files changed, 24 insertions(+), 110 deletions(-) delete mode 100644 compiler/testData/codegen/box/delegatedProperty/withInvoke.kt delete mode 100644 compiler/testData/diagnostics/tests/operatorsOverloading/destructuringDeclarationWithInvoke.fir.kt diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirBlackBoxCodegenBasedTestGenerated.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirBlackBoxCodegenBasedTestGenerated.java index d75315c95f4..a0fd31835e8 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirBlackBoxCodegenBasedTestGenerated.java +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirBlackBoxCodegenBasedTestGenerated.java @@ -16064,12 +16064,6 @@ public class LLFirBlackBoxCodegenBasedTestGenerated extends AbstractLLFirBlackBo runTest("compiler/testData/codegen/box/delegatedProperty/varInInnerClass.kt"); } - @Test - @TestMetadata("withInvoke.kt") - public void testWithInvoke() throws Exception { - runTest("compiler/testData/codegen/box/delegatedProperty/withInvoke.kt"); - } - @Nested @TestMetadata("compiler/testData/codegen/box/delegatedProperty/delegateToAnother") @TestDataPath("$PROJECT_ROOT") diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirReversedBlackBoxCodegenBasedTestGenerated.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirReversedBlackBoxCodegenBasedTestGenerated.java index ac3757f9ca0..ba4fc88aee6 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirReversedBlackBoxCodegenBasedTestGenerated.java +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirReversedBlackBoxCodegenBasedTestGenerated.java @@ -16064,12 +16064,6 @@ public class LLFirReversedBlackBoxCodegenBasedTestGenerated extends AbstractLLFi runTest("compiler/testData/codegen/box/delegatedProperty/varInInnerClass.kt"); } - @Test - @TestMetadata("withInvoke.kt") - public void testWithInvoke() throws Exception { - runTest("compiler/testData/codegen/box/delegatedProperty/withInvoke.kt"); - } - @Nested @TestMetadata("compiler/testData/codegen/box/delegatedProperty/delegateToAnother") @TestDataPath("$PROJECT_ROOT") diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirConventionFunctionCallChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirConventionFunctionCallChecker.kt index a4179d7f663..555e2c23654 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirConventionFunctionCallChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirConventionFunctionCallChecker.kt @@ -47,11 +47,6 @@ object FirConventionFunctionCallChecker : FirFunctionCallChecker() { ) { if (callExpression.dispatchReceiver?.resolvedType is ConeDynamicType) return // KT-61905: TODO: Return also in case of error type. - val sourceKind = callExpression.source?.kind - if (sourceKind !is KtRealSourceElementKind && - sourceKind !is KtFakeSourceElementKind.GeneratedComparisonExpression && - sourceKind !is KtFakeSourceElementKind.DesugaredCompoundAssignment - ) return val unwrapped = receiver?.unwrapSmartcastExpression() if (unwrapped !is FirPropertyAccessExpression) return val diagnostic = unwrapped.nonFatalDiagnostics.firstIsInstanceOrNull() ?: return diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java index 13c16fd93d3..b161bdb6cbe 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java @@ -16005,12 +16005,6 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr runTest("compiler/testData/codegen/box/delegatedProperty/varInInnerClass.kt"); } - @Test - @TestMetadata("withInvoke.kt") - public void testWithInvoke() throws Exception { - runTest("compiler/testData/codegen/box/delegatedProperty/withInvoke.kt"); - } - @Nested @TestMetadata("compiler/testData/codegen/box/delegatedProperty/delegateToAnother") @TestDataPath("$PROJECT_ROOT") diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated.java index 1c9b52638be..dc93329dfdb 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated.java @@ -16005,12 +16005,6 @@ public class FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated runTest("compiler/testData/codegen/box/delegatedProperty/varInInnerClass.kt"); } - @Test - @TestMetadata("withInvoke.kt") - public void testWithInvoke() throws Exception { - runTest("compiler/testData/codegen/box/delegatedProperty/withInvoke.kt"); - } - @Nested @TestMetadata("compiler/testData/codegen/box/delegatedProperty/delegateToAnother") @TestDataPath("$PROJECT_ROOT") diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java index 2ae8df818e0..4623b04afec 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java @@ -16005,12 +16005,6 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo runTest("compiler/testData/codegen/box/delegatedProperty/varInInnerClass.kt"); } - @Test - @TestMetadata("withInvoke.kt") - public void testWithInvoke() throws Exception { - runTest("compiler/testData/codegen/box/delegatedProperty/withInvoke.kt"); - } - @Nested @TestMetadata("compiler/testData/codegen/box/delegatedProperty/delegateToAnother") @TestDataPath("$PROJECT_ROOT") diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/CandidateFactory.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/CandidateFactory.kt index 10a372cdb65..fc39b977bb0 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/CandidateFactory.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/CandidateFactory.kt @@ -100,9 +100,16 @@ class CandidateFactory private constructor( } else if (objectsByName && symbol.isRegularClassWithoutCompanion(callInfo.session)) { result.addDiagnostic(NoCompanionObject) } - if (callInfo.origin == FirFunctionCallOrigin.Operator && symbol is FirPropertySymbol) { - // Flag all property references that are resolved from an convention operator call. - result.addDiagnostic(PropertyAsOperator) + if (callInfo.origin == FirFunctionCallOrigin.Operator) { + val propertySymbol = when { + symbol is FirPropertySymbol -> symbol + callInfo.candidateForCommonInvokeReceiver != null -> callInfo.candidateForCommonInvokeReceiver.symbol as? FirPropertySymbol + else -> null + } + if (propertySymbol != null) { + // Flag all property references that are resolved from an convention operator call. + result.addDiagnostic(PropertyAsOperator(propertySymbol)) + } } if (symbol is FirPropertySymbol && !context.session.languageVersionSettings.supportsFeature(LanguageFeature.PrioritizedEnumEntries) diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirCallCompletionResultsWriterTransformer.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirCallCompletionResultsWriterTransformer.kt index cf856a5064a..fccf2a0aa31 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirCallCompletionResultsWriterTransformer.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirCallCompletionResultsWriterTransformer.kt @@ -20,10 +20,7 @@ import org.jetbrains.kotlin.fir.references.FirNamedReference import org.jetbrains.kotlin.fir.references.builder.buildResolvedCallableReference import org.jetbrains.kotlin.fir.references.builder.buildResolvedNamedReference import org.jetbrains.kotlin.fir.resolve.* -import org.jetbrains.kotlin.fir.resolve.calls.Candidate -import org.jetbrains.kotlin.fir.resolve.calls.FirErrorReferenceWithCandidate -import org.jetbrains.kotlin.fir.resolve.calls.FirNamedReferenceWithCandidate -import org.jetbrains.kotlin.fir.resolve.calls.ResolutionResultOverridesOtherToPreserveCompatibility +import org.jetbrains.kotlin.fir.resolve.calls.* import org.jetbrains.kotlin.fir.resolve.dfa.FirDataFlowAnalyzer import org.jetbrains.kotlin.fir.resolve.diagnostics.* import org.jetbrains.kotlin.fir.resolve.inference.ResolvedLambdaAtom @@ -50,6 +47,7 @@ import org.jetbrains.kotlin.resolve.calls.tower.CandidateApplicability import org.jetbrains.kotlin.resolve.calls.tower.isSuccess import org.jetbrains.kotlin.types.TypeApproximatorConfiguration import org.jetbrains.kotlin.types.Variance +import org.jetbrains.kotlin.utils.addToStdlib.firstIsInstanceOrNull import org.jetbrains.kotlin.utils.addToStdlib.runIf import kotlin.collections.component1 import kotlin.collections.component2 @@ -148,8 +146,8 @@ class FirCallCompletionResultsWriterTransformer( qualifiedAccessExpression.replaceContextReceiverArguments(subCandidate.contextReceiverArguments()) - if (qualifiedAccessExpression is FirPropertyAccessExpressionImpl && calleeReference.candidate.currentApplicability == CandidateApplicability.K2_PROPERTY_AS_OPERATOR) { - val conePropertyAsOperator = ConePropertyAsOperator(calleeReference.candidate.symbol as FirPropertySymbol) + subCandidate.diagnostics.firstIsInstanceOrNull()?.let { propertyAsOperator -> + val conePropertyAsOperator = ConePropertyAsOperator(propertyAsOperator.propertySymbol) val nonFatalDiagnostics: List = buildList { addAll(qualifiedAccessExpression.nonFatalDiagnostics) add(conePropertyAsOperator) diff --git a/compiler/fir/semantics/src/org/jetbrains/kotlin/fir/resolve/calls/ResolutionDiagnostic.kt b/compiler/fir/semantics/src/org/jetbrains/kotlin/fir/resolve/calls/ResolutionDiagnostic.kt index 4852cfd43c6..7d5830d45cc 100644 --- a/compiler/fir/semantics/src/org/jetbrains/kotlin/fir/resolve/calls/ResolutionDiagnostic.kt +++ b/compiler/fir/semantics/src/org/jetbrains/kotlin/fir/resolve/calls/ResolutionDiagnostic.kt @@ -7,7 +7,6 @@ package org.jetbrains.kotlin.fir.resolve.calls import org.jetbrains.kotlin.KtSourceElement import org.jetbrains.kotlin.fir.declarations.FirFunction -import org.jetbrains.kotlin.fir.declarations.FirReceiverParameter import org.jetbrains.kotlin.fir.declarations.FirValueParameter import org.jetbrains.kotlin.fir.expressions.FirExpression import org.jetbrains.kotlin.fir.expressions.FirNamedArgumentExpression @@ -15,6 +14,7 @@ import org.jetbrains.kotlin.fir.expressions.FirSmartCastExpression import org.jetbrains.kotlin.fir.symbols.FirBasedSymbol import org.jetbrains.kotlin.fir.symbols.impl.FirConstructorSymbol import org.jetbrains.kotlin.fir.symbols.impl.FirNamedFunctionSymbol +import org.jetbrains.kotlin.fir.symbols.impl.FirPropertySymbol import org.jetbrains.kotlin.fir.symbols.impl.FirTypeParameterSymbol import org.jetbrains.kotlin.fir.types.ConeKotlinType import org.jetbrains.kotlin.fir.types.ConeTypeVariable @@ -134,7 +134,7 @@ class OperatorCallOfConstructor(val constructor: FirConstructorSymbol) : Resolut class InferenceError(val constraintError: ConstraintSystemError) : ResolutionDiagnostic(constraintError.applicability) class Unsupported(val message: String, val source: KtSourceElement?) : ResolutionDiagnostic(K2_UNSUPPORTED) -object PropertyAsOperator : ResolutionDiagnostic(K2_PROPERTY_AS_OPERATOR) +class PropertyAsOperator(val propertySymbol: FirPropertySymbol) : ResolutionDiagnostic(K2_PROPERTY_AS_OPERATOR) class DslScopeViolation(val calleeSymbol: FirBasedSymbol<*>) : ResolutionDiagnostic(RESOLVED_WITH_ERROR) @@ -158,4 +158,4 @@ object TypeParameterAsExpression : ResolutionDiagnostic(INAPPLICABLE) class StubBuilderInferenceReceiver( val typeParameterSymbol: FirTypeParameterSymbol -) : ResolutionDiagnostic(RESOLVED_WITH_ERROR) \ No newline at end of file +) : ResolutionDiagnostic(RESOLVED_WITH_ERROR) diff --git a/compiler/testData/codegen/box/delegatedProperty/withInvoke.kt b/compiler/testData/codegen/box/delegatedProperty/withInvoke.kt deleted file mode 100644 index 166c952024e..00000000000 --- a/compiler/testData/codegen/box/delegatedProperty/withInvoke.kt +++ /dev/null @@ -1,17 +0,0 @@ -// TARGET_BACKEND: JVM_IR -// IGNORE_BACKEND_K1: JVM_IR -// ISSUE: KT-61633 - -class C(val p: T3) -class D(val p: T4) - -val C.getValue: D get() = D(p) -operator fun D.invoke(x: Any?, y: Any?): X4 = p - -fun foo(c: C): String { - val y1 by c - - return y1 -} - -fun box(): String = foo(C("OK")) \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/withInvokes.fir.kt b/compiler/testData/diagnostics/tests/delegatedProperty/withInvokes.fir.kt index 8830e1ce58f..966f0cbd448 100644 --- a/compiler/testData/diagnostics/tests/delegatedProperty/withInvokes.fir.kt +++ b/compiler/testData/diagnostics/tests/delegatedProperty/withInvokes.fir.kt @@ -12,11 +12,11 @@ val C.getValue: D get() = TODO() operator fun D.invoke(x: Any?, y: Any?): X4 = TODO() fun foo(a: A, c: C) { - val x1 by a + val x1 by a x1 x1.length - val y1 by c + val y1 by c y1 y1.length -} \ No newline at end of file +} diff --git a/compiler/testData/diagnostics/tests/operatorsOverloading/PropertyInvoke.fir.kt b/compiler/testData/diagnostics/tests/operatorsOverloading/PropertyInvoke.fir.kt index a82647a9c1c..34ca9571eb2 100644 --- a/compiler/testData/diagnostics/tests/operatorsOverloading/PropertyInvoke.fir.kt +++ b/compiler/testData/diagnostics/tests/operatorsOverloading/PropertyInvoke.fir.kt @@ -67,7 +67,7 @@ fun useSet() { e[1] = 3 } val E.contains: I get() = I() val useContains = 1 in e -val useNotContains = 1 !in e +val useNotContains = 1 !in e val E.invoke: I get() = I() val useInvoke = e() diff --git a/compiler/testData/diagnostics/tests/operatorsOverloading/destructuringDeclarationWithInvoke.fir.kt b/compiler/testData/diagnostics/tests/operatorsOverloading/destructuringDeclarationWithInvoke.fir.kt deleted file mode 100644 index 0df1d4f9475..00000000000 --- a/compiler/testData/diagnostics/tests/operatorsOverloading/destructuringDeclarationWithInvoke.fir.kt +++ /dev/null @@ -1,23 +0,0 @@ -// ISSUE: KT-59715 - -class FunctionComponent { - val component1: () -> String = { "hello" } -} - -class I { - operator fun invoke(): String = "hello" -} - -class InvokeComponent { - val component1: I = I() -} - -fun test_1(c: FunctionComponent) { - val (x) = FunctionComponent() - val (y) = c -} - -fun test_2(c: InvokeComponent) { - val (x) = FunctionComponent() - val (y) = c -} diff --git a/compiler/testData/diagnostics/tests/operatorsOverloading/destructuringDeclarationWithInvoke.kt b/compiler/testData/diagnostics/tests/operatorsOverloading/destructuringDeclarationWithInvoke.kt index a76f018146d..2d8eae14a9d 100644 --- a/compiler/testData/diagnostics/tests/operatorsOverloading/destructuringDeclarationWithInvoke.kt +++ b/compiler/testData/diagnostics/tests/operatorsOverloading/destructuringDeclarationWithInvoke.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // ISSUE: KT-59715 class FunctionComponent { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java index facaedcfbfb..0a6558ea709 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java @@ -16005,12 +16005,6 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/delegatedProperty/varInInnerClass.kt"); } - @Test - @TestMetadata("withInvoke.kt") - public void testWithInvoke() throws Exception { - runTest("compiler/testData/codegen/box/delegatedProperty/withInvoke.kt"); - } - @Nested @TestMetadata("compiler/testData/codegen/box/delegatedProperty/delegateToAnother") @TestDataPath("$PROJECT_ROOT") diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java index 3df1ef9dcff..a9bd474ae4d 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java @@ -16005,12 +16005,6 @@ public class IrBlackBoxCodegenWithIrInlinerTestGenerated extends AbstractIrBlack runTest("compiler/testData/codegen/box/delegatedProperty/varInInnerClass.kt"); } - @Test - @TestMetadata("withInvoke.kt") - public void testWithInvoke() throws Exception { - runTest("compiler/testData/codegen/box/delegatedProperty/withInvoke.kt"); - } - @Nested @TestMetadata("compiler/testData/codegen/box/delegatedProperty/delegateToAnother") @TestDataPath("$PROJECT_ROOT") diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java index cb045c2515d..62316c277ad 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -12854,11 +12854,6 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/delegatedProperty/genericDelegateUncheckedCast2.kt"); } - @TestMetadata("withInvoke.kt") - public void ignoreWithInvoke() throws Exception { - runTest("compiler/testData/codegen/box/delegatedProperty/withInvoke.kt"); - } - private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); } diff --git a/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-4/neg/1.1.fir.kt b/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-4/neg/1.1.fir.kt index d664f29fba5..b53de572038 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-4/neg/1.1.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-4/neg/1.1.fir.kt @@ -25,7 +25,7 @@ fun case1() { } class B() { - val p: String by Delegate() // DELEGATE_SPECIAL_FUNCTION_NONE_APPLICABLE expected + val p: String by Delegate() // DELEGATE_SPECIAL_FUNCTION_NONE_APPLICABLE expected } class Delegate { @@ -50,7 +50,7 @@ fun case2() { } class B() { - var p: String by Delegate() // DELEGATE_SPECIAL_FUNCTION_NONE_APPLICABLE expected + var p: String by Delegate() // DELEGATE_SPECIAL_FUNCTION_NONE_APPLICABLE expected } class Delegate {