[FIR] K2: investigate early extension receiver type check Apply 'shouldSkipCandidateWithInconsistentExtensionReceiver' to all packages except for extension receivers with function types. The function is not suitable for function types due to coercions and conversions. ^KT-55414
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 d636384..2d07f15 100644 --- a/analysis/analysis-api/testData/components/callResolver/resolveCandidates/multipleCandidates/groupBy.txt +++ b/analysis/analysis-api/testData/components/callResolver/resolveCandidates/multipleCandidates/groupBy.txt
@@ -82,52 +82,4 @@ symbol = keySelector: kotlin.Function1<T, K> callableIdIfNonLocal = null) } - isInBestCandidates = false - -KtInapplicableCallCandidateInfo: - diagnostic = ERROR<INAPPLICABLE_CANDIDATE: Inapplicable candidate(s): fun <K> List<Pair<Int, Int>>.groupBy(keySelector: (Pair<Int, Int>) -> K, valueTransform: (Pair<Int, Int>) -> Int): Map<K, List<Int>>> - candidate = KtSimpleFunctionCall: - isImplicitInvoke = false - partiallyAppliedSymbol = KtPartiallyAppliedSymbol: - dispatchReceiver = null - extensionReceiver = KtExplicitReceiverValue: - expression = nums.withIndex() - isSafeNavigation = false - type = kotlin.collections.Iterable<kotlin.collections.IndexedValue<kotlin.Int>> - signature = KtFunctionLikeSignature: - receiverType = kotlin.collections.List<kotlin.Pair<kotlin.Int, kotlin.Int>> - returnType = kotlin.collections.Map<kotlin.collections.IndexedValue<kotlin.Int>, kotlin.collections.List<kotlin.Int>> - symbol = /groupBy(<extension receiver>: kotlin.collections.List<kotlin.Pair<kotlin.Int, kotlin.Int>>, keySelector: kotlin.Function1<kotlin.Pair<kotlin.Int, kotlin.Int>, K>, valueTransform: kotlin.Function1<kotlin.Pair<kotlin.Int, kotlin.Int>, kotlin.Int>): kotlin.collections.Map<K, kotlin.collections.List<kotlin.Int>> - valueParameters = [ - KtVariableLikeSignature: - name = keySelector - receiverType = null - returnType = kotlin.Function1<kotlin.Pair<kotlin.Int, kotlin.Int>, kotlin.collections.IndexedValue<kotlin.Int>> - symbol = keySelector: kotlin.Function1<kotlin.Pair<kotlin.Int, kotlin.Int>, K> - callableIdIfNonLocal = null, - KtVariableLikeSignature: - name = valueTransform - receiverType = null - returnType = kotlin.Function1<kotlin.Pair<kotlin.Int, kotlin.Int>, kotlin.Int> - symbol = valueTransform: kotlin.Function1<kotlin.Pair<kotlin.Int, kotlin.Int>, kotlin.Int> - callableIdIfNonLocal = null - ] - callableIdIfNonLocal = /groupBy - typeArgumentsMapping = { - K -> (kotlin.collections.IndexedValue<kotlin.Int>) - } - argumentMapping = { - { (_, value) -> value } -> (KtVariableLikeSignature: - name = keySelector - receiverType = null - returnType = kotlin.Function1<kotlin.Pair<kotlin.Int, kotlin.Int>, kotlin.collections.IndexedValue<kotlin.Int>> - symbol = keySelector: kotlin.Function1<kotlin.Pair<kotlin.Int, kotlin.Int>, K> - callableIdIfNonLocal = null), - { (idx, _) -> idx } -> (KtVariableLikeSignature: - name = valueTransform - receiverType = null - returnType = kotlin.Function1<kotlin.Pair<kotlin.Int, kotlin.Int>, kotlin.Int> - symbol = valueTransform: kotlin.Function1<kotlin.Pair<kotlin.Int, kotlin.Int>, kotlin.Int> - callableIdIfNonLocal = null) - } - isInBestCandidates = false + isInBestCandidates = false \ No newline at end of file
diff --git a/analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/consecutiveImplicitInvoke1.txt b/analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/consecutiveImplicitInvoke1.txt index 49f89c5..26d3280 100644 --- a/analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/consecutiveImplicitInvoke1.txt +++ b/analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/consecutiveImplicitInvoke1.txt
@@ -1,24 +1,3 @@ -KtInapplicableCallCandidateInfo: - diagnostic = ERROR<UNRESOLVED_REFERENCE_WRONG_RECEIVER: Unresolved reference. None of the following candidates is applicable because of a receiver type mismatch: - fun Double.invoke(): Unit> - candidate = KtSimpleFunctionCall: - isImplicitInvoke = true - partiallyAppliedSymbol = KtPartiallyAppliedSymbol: - dispatchReceiver = null - extensionReceiver = KtExplicitReceiverValue: - expression = i - isSafeNavigation = false - type = kotlin.Int - signature = KtFunctionLikeSignature: - receiverType = kotlin.Double - returnType = kotlin.Unit - symbol = /invoke(<extension receiver>: kotlin.Double): kotlin.Unit - valueParameters = [] - callableIdIfNonLocal = /invoke - typeArgumentsMapping = {} - argumentMapping = {} - isInBestCandidates = false - KtApplicableCallCandidateInfo: candidate = KtSimpleFunctionCall: isImplicitInvoke = true @@ -36,25 +15,4 @@ callableIdIfNonLocal = /invoke typeArgumentsMapping = {} argumentMapping = {} - isInBestCandidates = true - -KtInapplicableCallCandidateInfo: - diagnostic = ERROR<UNRESOLVED_REFERENCE_WRONG_RECEIVER: Unresolved reference. None of the following candidates is applicable because of a receiver type mismatch: - fun Long.invoke(): Double> - candidate = KtSimpleFunctionCall: - isImplicitInvoke = true - partiallyAppliedSymbol = KtPartiallyAppliedSymbol: - dispatchReceiver = null - extensionReceiver = KtExplicitReceiverValue: - expression = i - isSafeNavigation = false - type = kotlin.Int - signature = KtFunctionLikeSignature: - receiverType = kotlin.Long - returnType = kotlin.Double - symbol = /invoke(<extension receiver>: kotlin.Long): kotlin.Double - valueParameters = [] - callableIdIfNonLocal = /invoke - typeArgumentsMapping = {} - argumentMapping = {} - isInBestCandidates = false + isInBestCandidates = true \ No newline at end of file
diff --git a/analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/consecutiveImplicitInvoke2.txt b/analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/consecutiveImplicitInvoke2.txt index 45ae158..fc0a0d9 100644 --- a/analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/consecutiveImplicitInvoke2.txt +++ b/analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/consecutiveImplicitInvoke2.txt
@@ -1,45 +1,3 @@ -KtInapplicableCallCandidateInfo: - diagnostic = ERROR<UNRESOLVED_REFERENCE_WRONG_RECEIVER: Unresolved reference. None of the following candidates is applicable because of a receiver type mismatch: - fun Double.invoke(): Unit> - candidate = KtSimpleFunctionCall: - isImplicitInvoke = true - partiallyAppliedSymbol = KtPartiallyAppliedSymbol: - dispatchReceiver = null - extensionReceiver = KtExplicitReceiverValue: - expression = i() - isSafeNavigation = false - type = kotlin.Long - signature = KtFunctionLikeSignature: - receiverType = kotlin.Double - returnType = kotlin.Unit - symbol = /invoke(<extension receiver>: kotlin.Double): kotlin.Unit - valueParameters = [] - callableIdIfNonLocal = /invoke - typeArgumentsMapping = {} - argumentMapping = {} - isInBestCandidates = false - -KtInapplicableCallCandidateInfo: - diagnostic = ERROR<UNRESOLVED_REFERENCE_WRONG_RECEIVER: Unresolved reference. None of the following candidates is applicable because of a receiver type mismatch: - fun Int.invoke(): Long> - candidate = KtSimpleFunctionCall: - isImplicitInvoke = true - partiallyAppliedSymbol = KtPartiallyAppliedSymbol: - dispatchReceiver = null - extensionReceiver = KtExplicitReceiverValue: - expression = i() - isSafeNavigation = false - type = kotlin.Long - signature = KtFunctionLikeSignature: - receiverType = kotlin.Int - returnType = kotlin.Long - symbol = /invoke(<extension receiver>: kotlin.Int): kotlin.Long - valueParameters = [] - callableIdIfNonLocal = /invoke - typeArgumentsMapping = {} - argumentMapping = {} - isInBestCandidates = false - KtApplicableCallCandidateInfo: candidate = KtSimpleFunctionCall: isImplicitInvoke = true @@ -57,4 +15,4 @@ callableIdIfNonLocal = /invoke typeArgumentsMapping = {} argumentMapping = {} - isInBestCandidates = true + isInBestCandidates = true \ No newline at end of file
diff --git a/analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/consecutiveImplicitInvoke3.txt b/analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/consecutiveImplicitInvoke3.txt index 4b14ca5..b58e6e9 100644 --- a/analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/consecutiveImplicitInvoke3.txt +++ b/analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/consecutiveImplicitInvoke3.txt
@@ -15,46 +15,4 @@ callableIdIfNonLocal = /invoke typeArgumentsMapping = {} argumentMapping = {} - isInBestCandidates = true - -KtInapplicableCallCandidateInfo: - diagnostic = ERROR<UNRESOLVED_REFERENCE_WRONG_RECEIVER: Unresolved reference. None of the following candidates is applicable because of a receiver type mismatch: - fun Int.invoke(): Long> - candidate = KtSimpleFunctionCall: - isImplicitInvoke = true - partiallyAppliedSymbol = KtPartiallyAppliedSymbol: - dispatchReceiver = null - extensionReceiver = KtExplicitReceiverValue: - expression = i()() - isSafeNavigation = false - type = kotlin.Double - signature = KtFunctionLikeSignature: - receiverType = kotlin.Int - returnType = kotlin.Long - symbol = /invoke(<extension receiver>: kotlin.Int): kotlin.Long - valueParameters = [] - callableIdIfNonLocal = /invoke - typeArgumentsMapping = {} - argumentMapping = {} - isInBestCandidates = false - -KtInapplicableCallCandidateInfo: - diagnostic = ERROR<UNRESOLVED_REFERENCE_WRONG_RECEIVER: Unresolved reference. None of the following candidates is applicable because of a receiver type mismatch: - fun Long.invoke(): Double> - candidate = KtSimpleFunctionCall: - isImplicitInvoke = true - partiallyAppliedSymbol = KtPartiallyAppliedSymbol: - dispatchReceiver = null - extensionReceiver = KtExplicitReceiverValue: - expression = i()() - isSafeNavigation = false - type = kotlin.Double - signature = KtFunctionLikeSignature: - receiverType = kotlin.Long - returnType = kotlin.Double - symbol = /invoke(<extension receiver>: kotlin.Long): kotlin.Double - valueParameters = [] - callableIdIfNonLocal = /invoke - typeArgumentsMapping = {} - argumentMapping = {} - isInBestCandidates = false + isInBestCandidates = true \ No newline at end of file
diff --git a/analysis/analysis-api/testData/components/importOptimizer/analyseImports/referencesWithErrors/usedExtensionProperty_invalidReceiver.importsAnalysis b/analysis/analysis-api/testData/components/importOptimizer/analyseImports/referencesWithErrors/usedExtensionProperty_invalidReceiver.importsAnalysis index 11f7dda..bf58a2e 100644 --- a/analysis/analysis-api/testData/components/importOptimizer/analyseImports/referencesWithErrors/usedExtensionProperty_invalidReceiver.importsAnalysis +++ b/analysis/analysis-api/testData/components/importOptimizer/analyseImports/referencesWithErrors/usedExtensionProperty_invalidReceiver.importsAnalysis
@@ -1,9 +1,7 @@ USED DECLARATIONS: -Declaration: dependency.fooExtProp -By names: [fooExtProp] - Declaration: kotlin.Any By names: [Any] UNRESOLVED NAMES: +fooExtProp
diff --git a/analysis/low-level-api-fir/testData/getOrBuildFir/kt60638.txt b/analysis/low-level-api-fir/testData/getOrBuildFir/kt60638.txt index 88b8186..ab7b815 100644 --- a/analysis/low-level-api-fir/testData/getOrBuildFir/kt60638.txt +++ b/analysis/low-level-api-fir/testData/getOrBuildFir/kt60638.txt
@@ -3,7 +3,7 @@ FIR source kind: KtRealSourceElementKind FIR element rendered: -<Expression 'isInterface' of type 'kotlin/Int' cannot be invoked as a function># +<Unresolved name: isInterface># FIR FILE: FILE: [ResolvedTo(IMPORTS)] kt60638.kt @@ -15,16 +15,14 @@ } } - public final [ResolvedTo(STATUS)] class MyClass : R|kotlin/Any| { - public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] constructor(): R|usage/MyClass| { + public final? [ResolvedTo(RAW_FIR)] class MyClass : R|kotlin/Any| { + public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=MyClass] constructor(): R|usage/MyClass| { LAZY_super<R|kotlin/Any|> } } - public final [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] val R|usage/MyClass|.isInterface: R|kotlin/Int| - public [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] get(): R|kotlin/Int| { - ^ Int(4) - } + public? final? [ResolvedTo(TYPES)] val R|usage/MyClass|.isInterface: <implicit> + public? [ResolvedTo(TYPES)] get(): <implicit> { LAZY_BLOCK } public final [ResolvedTo(BODY_RESOLVE)] fun usage([ResolvedTo(BODY_RESOLVE)] type: R|usage/MyType|): R|kotlin/Unit| { - R|<local>/type|.<Expression 'isInterface' of type 'kotlin/Int' cannot be invoked as a function>#() - } + R|<local>/type|.<Unresolved name: isInterface>#() + } \ No newline at end of file
diff --git a/compiler/fir/analysis-tests/testData/resolve/callResolution/suspendCOnversionForReceiver.fir.txt b/compiler/fir/analysis-tests/testData/resolve/callResolution/suspendCOnversionForReceiver.fir.txt index 212cd93..c80959e 100644 --- a/compiler/fir/analysis-tests/testData/resolve/callResolution/suspendCOnversionForReceiver.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/callResolution/suspendCOnversionForReceiver.fir.txt
@@ -8,4 +8,8 @@ public final fun main(): R|kotlin/Unit| { R|/parameterFunc|(::R|/testFunc|) ::R|/testFunc|.R|/extensionFunc|() + fun <anonymous>(): R|kotlin/Unit| <inline=Unknown> { + ^ Unit + } + .R|/extensionFunc|() }
diff --git a/compiler/fir/analysis-tests/testData/resolve/callResolution/suspendCOnversionForReceiver.kt b/compiler/fir/analysis-tests/testData/resolve/callResolution/suspendCOnversionForReceiver.kt index 8baff6d..7a70e15 100644 --- a/compiler/fir/analysis-tests/testData/resolve/callResolution/suspendCOnversionForReceiver.kt +++ b/compiler/fir/analysis-tests/testData/resolve/callResolution/suspendCOnversionForReceiver.kt
@@ -7,4 +7,5 @@ fun main() { parameterFunc(::testFunc) (::testFunc).extensionFunc() + ({}).extensionFunc() }
diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/orInWhenBranch.fir.txt b/compiler/fir/analysis-tests/testData/resolve/smartcasts/orInWhenBranch.fir.txt index 1c18f35..a88e651 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/orInWhenBranch.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/orInWhenBranch.fir.txt
@@ -4,7 +4,7 @@ public final fun test_1(a: R|kotlin/Any?|): R|kotlin/Unit| { when (R|<local>/a|) { ($subj$ is R|kotlin/String|) || ($subj$ is R|kotlin/Any|) -> { - R|<local>/a|.R|/foo<None of the following candidates is applicable because of receiver type mismatch: [/foo]>#|() + R|<local>/a|.<Unresolved name: foo>#() } } @@ -12,7 +12,7 @@ public final fun test_2(a: R|kotlin/Any?|): R|kotlin/Unit| { when () { (R|<local>/a| is R|kotlin/String|) || (R|<local>/a| is R|kotlin/Any|) -> { - R|<local>/a|.R|/foo<None of the following candidates is applicable because of receiver type mismatch: [/foo]>#|() + R|<local>/a|.<Unresolved name: foo>#() } } @@ -20,7 +20,7 @@ public final fun test_3(a: R|kotlin/Any?|, b: R|kotlin/Boolean|): R|kotlin/Unit| { when (R|<local>/a|) { ($subj$ is R|kotlin/String|) || ==($subj$, R|<local>/b|) -> { - R|<local>/a|.R|/foo<None of the following candidates is applicable because of receiver type mismatch: [/foo]>#|() + R|<local>/a|.<Unresolved name: foo>#() } } @@ -28,7 +28,7 @@ public final fun test_4(a: R|kotlin/Any?|, b: R|kotlin/Boolean|): R|kotlin/Unit| { when () { (R|<local>/a| is R|kotlin/String|) || R|<local>/b| -> { - R|<local>/a|.R|/foo<None of the following candidates is applicable because of receiver type mismatch: [/foo]>#|() + R|<local>/a|.<Unresolved name: foo>#() } }
diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/orInWhenBranch.kt b/compiler/fir/analysis-tests/testData/resolve/smartcasts/orInWhenBranch.kt index 61e14e1..9700efd 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/orInWhenBranch.kt +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/orInWhenBranch.kt
@@ -4,24 +4,24 @@ fun test_1(a: Any?) { when (a) { - is String, is Any -> a.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>foo<!>() // Should be Bad + is String, is Any -> a.<!UNRESOLVED_REFERENCE!>foo<!>() // Should be Bad } } fun test_2(a: Any?) { if (a is String || a is Any) { - a.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>foo<!>() // Should be Bad + a.<!UNRESOLVED_REFERENCE!>foo<!>() // Should be Bad } } fun test_3(a: Any?, b: Boolean) { when (a) { - is String, b -> a.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>foo<!>() // Should be Bad + is String, b -> a.<!UNRESOLVED_REFERENCE!>foo<!>() // Should be Bad } } fun test_4(a: Any?, b: Boolean) { if (a is String || b) { - a.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>foo<!>() // Should be Bad + a.<!UNRESOLVED_REFERENCE!>foo<!>() // Should be Bad } }
diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/tower/TowerLevels.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/tower/TowerLevels.kt index a6086da..25de983 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/tower/TowerLevels.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/tower/TowerLevels.kt
@@ -19,7 +19,6 @@ import org.jetbrains.kotlin.fir.resolve.calls.* import org.jetbrains.kotlin.fir.resolve.providers.symbolProvider import org.jetbrains.kotlin.fir.scopes.* -import org.jetbrains.kotlin.fir.scopes.impl.FirDefaultStarImportingScope import org.jetbrains.kotlin.fir.scopes.impl.importedFromObjectOrStaticData import org.jetbrains.kotlin.fir.symbols.FirBasedSymbol import org.jetbrains.kotlin.fir.symbols.impl.* @@ -386,7 +385,7 @@ private fun shouldSkipCandidateWithInconsistentExtensionReceiver(candidate: FirCallableSymbol<*>): Boolean { // Pre-check explicit extension receiver for default package top-level members - if (scope !is FirDefaultStarImportingScope || !areThereExtensionReceiverOptions()) return false + if (!areThereExtensionReceiverOptions()) return false val declarationReceiverType = candidate.resolvedReceiverTypeRef?.coneType as? ConeClassLikeType ?: return false val startProjectedDeclarationReceiverType = declarationReceiverType.lookupTag.constructClassType( @@ -399,6 +398,9 @@ // If some receiver is non class like, we should not skip it if (extensionReceiverType !is ConeClassLikeType) return@none true + // If a some receiver has function type, we should not skip it due to coercions/conversions + if (extensionReceiverType.isSomeFunctionType(session)) return@none true + AbstractTypeChecker.isSubtypeOf( session.typeContext, extensionReceiverType,
diff --git a/compiler/testData/diagnostics/tests/DeprecatedGetSetPropertyDelegateConvention.fir.kt b/compiler/testData/diagnostics/tests/DeprecatedGetSetPropertyDelegateConvention.fir.kt index c3b9add..2d182ab 100644 --- a/compiler/testData/diagnostics/tests/DeprecatedGetSetPropertyDelegateConvention.fir.kt +++ b/compiler/testData/diagnostics/tests/DeprecatedGetSetPropertyDelegateConvention.fir.kt
@@ -40,8 +40,8 @@ var d by CustomDelegate3() fun test() { - requireString(<!ARGUMENT_TYPE_MISMATCH!>a<!>) - requireString(<!ARGUMENT_TYPE_MISMATCH!>aval<!>) + requireString(<!DEBUG_INFO_EXPRESSION_TYPE("ERROR CLASS: Unresolved name: getValue")!>a<!>) + requireString(<!DEBUG_INFO_EXPRESSION_TYPE("ERROR CLASS: Unresolved name: getValue")!>aval<!>) requireString(b) requireInt(c) requireInt(d)
diff --git a/compiler/testData/diagnostics/tests/DeprecatedUnaryOperatorConventions.fir.kt b/compiler/testData/diagnostics/tests/DeprecatedUnaryOperatorConventions.fir.kt index 9d42256..3fdd16c 100644 --- a/compiler/testData/diagnostics/tests/DeprecatedUnaryOperatorConventions.fir.kt +++ b/compiler/testData/diagnostics/tests/DeprecatedUnaryOperatorConventions.fir.kt
@@ -15,7 +15,7 @@ fun test() { requireInt(+ "") requireInt(+ Example()) - requireString(<!ARGUMENT_TYPE_MISMATCH!><!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>+<!> ExampleDeprecated()<!>) + requireString(<!UNRESOLVED_REFERENCE!>+<!> ExampleDeprecated()) } fun requireInt(n: Int) {} @@ -26,7 +26,7 @@ <!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun minus() = this fun test() { - <!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>+<!>this + <!UNRESOLVED_REFERENCE!>+<!>this <!UNRESOLVED_REFERENCE!>-<!>this } }
diff --git a/compiler/testData/diagnostics/tests/annotations/extensionFunctionType.fir.kt b/compiler/testData/diagnostics/tests/annotations/extensionFunctionType.fir.kt index a02c26b..9ca58cd 100644 --- a/compiler/testData/diagnostics/tests/annotations/extensionFunctionType.fir.kt +++ b/compiler/testData/diagnostics/tests/annotations/extensionFunctionType.fir.kt
@@ -14,7 +14,7 @@ fun f5(): <!WRONG_EXTENSION_FUNCTION_TYPE!>@ExtensionFunctionType<!> () -> Int fun f6(x: <!WRONG_EXTENSION_FUNCTION_TYPE!>@ExtensionFunctionType<!> () -> Int) { - <!OVERLOAD_RESOLUTION_AMBIGUITY!>println<!>(x <!UNRESOLVED_REFERENCE!>+<!> 2) + <!OVERLOAD_RESOLUTION_AMBIGUITY!>println<!>(x <!NONE_APPLICABLE!>+<!> 2) } fun f7(x: <!WRONG_EXTENSION_FUNCTION_TYPE!>@ExtensionFunctionType<!> Function0<Int>)
diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/provideDelegateOnFunctionalTypeWithThis.fir.kt b/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/provideDelegateOnFunctionalTypeWithThis.fir.kt index a7c8dc3..4a46ea1 100644 --- a/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/provideDelegateOnFunctionalTypeWithThis.fir.kt +++ b/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/provideDelegateOnFunctionalTypeWithThis.fir.kt
@@ -13,7 +13,7 @@ class Wrong class Right { - val prop: () -> Unit by <!DELEGATE_SPECIAL_FUNCTION_MISSING!>::wrong<!> + val prop: () -> Unit by <!DELEGATE_SPECIAL_FUNCTION_NONE_APPLICABLE!>::wrong<!> } fun box(): String {
diff --git a/compiler/testData/diagnostics/tests/extensions/classObject.fir.kt b/compiler/testData/diagnostics/tests/extensions/classObject.fir.kt new file mode 100644 index 0000000..c06eeb2 --- /dev/null +++ b/compiler/testData/diagnostics/tests/extensions/classObject.fir.kt
@@ -0,0 +1,19 @@ +interface Tr + +class A { companion object } +class B { companion object : Tr } + +fun Any.f1() {} +fun Any?.f2() {} +fun Tr.f3() {} +fun Tr?.f4() {} +fun A.f5() {} + +fun test() { + A.f1() + A.f2() + B.f3() + B.f4() + A.<!UNRESOLVED_REFERENCE!>f5<!>() + B.<!UNRESOLVED_REFERENCE!>f5<!>() +}
diff --git a/compiler/testData/diagnostics/tests/extensions/classObject.kt b/compiler/testData/diagnostics/tests/extensions/classObject.kt index d255551..e6d4e5a 100644 --- a/compiler/testData/diagnostics/tests/extensions/classObject.kt +++ b/compiler/testData/diagnostics/tests/extensions/classObject.kt
@@ -1,4 +1,3 @@ -// FIR_IDENTICAL interface Tr class A { companion object }
diff --git a/compiler/testData/diagnostics/tests/extensions/contextReceivers/noExplicitReceiver.fir.kt b/compiler/testData/diagnostics/tests/extensions/contextReceivers/noExplicitReceiver.fir.kt new file mode 100644 index 0000000..9357c5b --- /dev/null +++ b/compiler/testData/diagnostics/tests/extensions/contextReceivers/noExplicitReceiver.fir.kt
@@ -0,0 +1,20 @@ +// LANGUAGE: +ContextReceivers + +class A +class B +class C + +context(A) fun B.f() {} +context(A) fun B.g() { + f() +} +context(A) fun C.h() { + <!UNRESOLVED_REFERENCE!>f<!>() +} + +fun A.q(b: B) { + with(b) { + f() + } + <!UNRESOLVED_REFERENCE!>f<!>() +} \ No newline at end of file
diff --git a/compiler/testData/diagnostics/tests/extensions/contextReceivers/noExplicitReceiver.kt b/compiler/testData/diagnostics/tests/extensions/contextReceivers/noExplicitReceiver.kt index 8786c63..7588b0a 100644 --- a/compiler/testData/diagnostics/tests/extensions/contextReceivers/noExplicitReceiver.kt +++ b/compiler/testData/diagnostics/tests/extensions/contextReceivers/noExplicitReceiver.kt
@@ -1,5 +1,4 @@ // LANGUAGE: +ContextReceivers -// FIR_IDENTICAL class A class B
diff --git a/compiler/testData/diagnostics/tests/extensions/contextReceivers/twoReceiverCandidatesError.fir.kt b/compiler/testData/diagnostics/tests/extensions/contextReceivers/twoReceiverCandidatesError.fir.kt new file mode 100644 index 0000000..d21c803 --- /dev/null +++ b/compiler/testData/diagnostics/tests/extensions/contextReceivers/twoReceiverCandidatesError.fir.kt
@@ -0,0 +1,16 @@ +// LANGUAGE: +ContextReceivers + +fun String.foo() {} + +context(Int, Double) +fun bar() { + <!UNRESOLVED_REFERENCE!>foo<!>() // should be prohibited +} + +fun main() { + with(1) { + with(2.0) { + bar() + } + } +}
diff --git a/compiler/testData/diagnostics/tests/extensions/contextReceivers/twoReceiverCandidatesError.kt b/compiler/testData/diagnostics/tests/extensions/contextReceivers/twoReceiverCandidatesError.kt index d49538b..6155978 100644 --- a/compiler/testData/diagnostics/tests/extensions/contextReceivers/twoReceiverCandidatesError.kt +++ b/compiler/testData/diagnostics/tests/extensions/contextReceivers/twoReceiverCandidatesError.kt
@@ -1,5 +1,4 @@ // LANGUAGE: +ContextReceivers -// FIR_IDENTICAL fun String.foo() {}
diff --git a/compiler/testData/diagnostics/tests/extensions/kt3563.fir.kt b/compiler/testData/diagnostics/tests/extensions/kt3563.fir.kt new file mode 100644 index 0000000..08d2402 --- /dev/null +++ b/compiler/testData/diagnostics/tests/extensions/kt3563.fir.kt
@@ -0,0 +1,16 @@ +// KT-3563 Compiler requiring java.io.File, and it's unclear why + +package bar + +import java.io.File + +class Customer(name1: String) + +fun foo(f: File, c: Customer) { + f.name1 + + c.<!UNRESOLVED_REFERENCE!>name1<!> // name1 should be unresolved here +} + +val File.name1: String + get() = getName()
diff --git a/compiler/testData/diagnostics/tests/extensions/kt3563.kt b/compiler/testData/diagnostics/tests/extensions/kt3563.kt index 0da0659..b7aa22e 100644 --- a/compiler/testData/diagnostics/tests/extensions/kt3563.kt +++ b/compiler/testData/diagnostics/tests/extensions/kt3563.kt
@@ -1,4 +1,3 @@ -// FIR_IDENTICAL // KT-3563 Compiler requiring java.io.File, and it's unclear why package bar
diff --git a/compiler/testData/diagnostics/tests/extensions/throwOutCandidatesByReceiver.fir.kt b/compiler/testData/diagnostics/tests/extensions/throwOutCandidatesByReceiver.fir.kt index 4439f00..67ec358 100644 --- a/compiler/testData/diagnostics/tests/extensions/throwOutCandidatesByReceiver.fir.kt +++ b/compiler/testData/diagnostics/tests/extensions/throwOutCandidatesByReceiver.fir.kt
@@ -7,20 +7,20 @@ fun test1(i: Int?) { 1.<!CANNOT_INFER_PARAMETER_TYPE, UNRESOLVED_REFERENCE_WRONG_RECEIVER!>a<!>() - i.<!CANNOT_INFER_PARAMETER_TYPE, UNRESOLVED_REFERENCE_WRONG_RECEIVER!>a<!>() + i.<!UNRESOLVED_REFERENCE!>a<!>() } fun <R> test2(c: Collection<R>) { - c.<!CANNOT_INFER_PARAMETER_TYPE, UNRESOLVED_REFERENCE_WRONG_RECEIVER!>a<!>() + c.<!UNRESOLVED_REFERENCE!>a<!>() } fun Int.foo() {} fun test3(s: String?) { - "".<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>foo<!>() - s.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>foo<!>() - "".foo(<!TOO_MANY_ARGUMENTS!>1<!>) - s.foo(<!TOO_MANY_ARGUMENTS!>"a"<!>) + "".<!UNRESOLVED_REFERENCE!>foo<!>() + s.<!UNRESOLVED_REFERENCE!>foo<!>() + "".<!UNRESOLVED_REFERENCE!>foo<!>(1) + s.<!UNRESOLVED_REFERENCE!>foo<!>("a") } interface A
diff --git a/compiler/testData/diagnostics/tests/generics/kt53656.fir.kt b/compiler/testData/diagnostics/tests/generics/kt53656.fir.kt index 8c4e05b..304349a 100644 --- a/compiler/testData/diagnostics/tests/generics/kt53656.fir.kt +++ b/compiler/testData/diagnostics/tests/generics/kt53656.fir.kt
@@ -11,5 +11,5 @@ class Order : Entity<Int> class SecuredOrder(order: Order) : SecuredEntity<<!UPPER_BOUND_VIOLATED!>Order<!>>(<!ARGUMENT_TYPE_MISMATCH!>order<!>) fun main() { - val securedOrder = Order().<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>secured<!>() + val securedOrder = Order().<!UNRESOLVED_REFERENCE!>secured<!>() }
diff --git a/compiler/testData/diagnostics/tests/inference/capturedTypes/approximateContravariantCapturedTypes.fir.kt b/compiler/testData/diagnostics/tests/inference/capturedTypes/approximateContravariantCapturedTypes.fir.kt index 56481fb..febc05f 100644 --- a/compiler/testData/diagnostics/tests/inference/capturedTypes/approximateContravariantCapturedTypes.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/capturedTypes/approximateContravariantCapturedTypes.fir.kt
@@ -62,7 +62,7 @@ fooSetRef.invoke(foo, <!ARGUMENT_TYPE_MISMATCH!>""<!>) fooSetRef2.invoke(foo, <!ARGUMENT_TYPE_MISMATCH!>""<!>) - foo.x.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>bar<!>() + foo.x.<!UNRESOLVED_REFERENCE!>bar<!>() } fun test4() { @@ -75,5 +75,5 @@ fooSetRef.invoke(foo, <!ARGUMENT_TYPE_MISMATCH!>""<!>) fooSetRef2.invoke(foo, <!ARGUMENT_TYPE_MISMATCH!>""<!>) - foo.x.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>bar<!>() + foo.x.<!UNRESOLVED_REFERENCE!>bar<!>() }
diff --git a/compiler/testData/diagnostics/tests/inference/capturedTypes/nullableCaptruredTypeAgainstNullableVariable.fir.kt b/compiler/testData/diagnostics/tests/inference/capturedTypes/nullableCaptruredTypeAgainstNullableVariable.fir.kt index 7761428..14844c5 100644 --- a/compiler/testData/diagnostics/tests/inference/capturedTypes/nullableCaptruredTypeAgainstNullableVariable.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/capturedTypes/nullableCaptruredTypeAgainstNullableVariable.fir.kt
@@ -24,8 +24,8 @@ y.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>foo<!>() y.bar() - y.<!CANNOT_INFER_PARAMETER_TYPE, UNRESOLVED_REFERENCE_WRONG_RECEIVER!>boo1<!>() - y.<!CANNOT_INFER_PARAMETER_TYPE, UNRESOLVED_REFERENCE_WRONG_RECEIVER!>boo2<!>() + y.<!UNRESOLVED_REFERENCE!>boo1<!>() + y.<!UNRESOLVED_REFERENCE!>boo2<!>() z1.foo() z1.bar() @@ -34,6 +34,6 @@ z2.foo() z2.bar() - z2.<!CANNOT_INFER_PARAMETER_TYPE, UNRESOLVED_REFERENCE_WRONG_RECEIVER!>boo1<!>() - z2.<!CANNOT_INFER_PARAMETER_TYPE, UNRESOLVED_REFERENCE_WRONG_RECEIVER!>boo2<!>() + z2.<!UNRESOLVED_REFERENCE!>boo1<!>() + z2.<!UNRESOLVED_REFERENCE!>boo2<!>() }
diff --git a/compiler/testData/diagnostics/tests/inference/capturedTypes/nullableCaptruredTypeAgainstNullableVariableWithDisabledComplatibilityFlag.fir.kt b/compiler/testData/diagnostics/tests/inference/capturedTypes/nullableCaptruredTypeAgainstNullableVariableWithDisabledComplatibilityFlag.fir.kt index 8830dec..f1352d1 100644 --- a/compiler/testData/diagnostics/tests/inference/capturedTypes/nullableCaptruredTypeAgainstNullableVariableWithDisabledComplatibilityFlag.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/capturedTypes/nullableCaptruredTypeAgainstNullableVariableWithDisabledComplatibilityFlag.fir.kt
@@ -24,8 +24,8 @@ y.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>foo<!>() y.bar() - y.<!CANNOT_INFER_PARAMETER_TYPE, UNRESOLVED_REFERENCE_WRONG_RECEIVER!>boo1<!>() - y.<!CANNOT_INFER_PARAMETER_TYPE, UNRESOLVED_REFERENCE_WRONG_RECEIVER!>boo2<!>() + y.<!UNRESOLVED_REFERENCE!>boo1<!>() + y.<!UNRESOLVED_REFERENCE!>boo2<!>() z1.foo() z1.bar() @@ -34,6 +34,6 @@ z2.foo() z2.bar() - z2.<!CANNOT_INFER_PARAMETER_TYPE, UNRESOLVED_REFERENCE_WRONG_RECEIVER!>boo1<!>() - z2.<!CANNOT_INFER_PARAMETER_TYPE, UNRESOLVED_REFERENCE_WRONG_RECEIVER!>boo2<!>() + z2.<!UNRESOLVED_REFERENCE!>boo1<!>() + z2.<!UNRESOLVED_REFERENCE!>boo2<!>() }
diff --git a/compiler/testData/diagnostics/tests/inference/reportingImprovements/reportUnresolvedReferenceWrongReceiverForManyCandidates.fir.kt b/compiler/testData/diagnostics/tests/inference/reportingImprovements/reportUnresolvedReferenceWrongReceiverForManyCandidates.fir.kt index d55f3fad..564f563 100644 --- a/compiler/testData/diagnostics/tests/inference/reportingImprovements/reportUnresolvedReferenceWrongReceiverForManyCandidates.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/reportingImprovements/reportUnresolvedReferenceWrongReceiverForManyCandidates.fir.kt
@@ -1,5 +1,5 @@ fun test() { - val a = <!NONE_APPLICABLE!>-<!>false + val a = <!UNRESOLVED_REFERENCE!>-<!>false } operator fun A.unaryMinus() {}
diff --git a/compiler/testData/diagnostics/tests/kt54587_2.fir.kt b/compiler/testData/diagnostics/tests/kt54587_2.fir.kt new file mode 100644 index 0000000..06e91b6 --- /dev/null +++ b/compiler/testData/diagnostics/tests/kt54587_2.fir.kt
@@ -0,0 +1,16 @@ +package one + +fun test(f: NextMissing) { + for(i in <!NEXT_MISSING!>f<!>) {} //[NEXT_NONE_APPLICABLE] is expected as in K1 +} + +interface Doo +operator fun Doo.next() {} + +interface NextMissing { + operator fun iterator(): NextMissing2 +} + +interface NextMissing2 { + operator fun hasNext(): Boolean +}
diff --git a/compiler/testData/diagnostics/tests/kt54587_2.kt b/compiler/testData/diagnostics/tests/kt54587_2.kt index f54c40a..f791bf2 100644 --- a/compiler/testData/diagnostics/tests/kt54587_2.kt +++ b/compiler/testData/diagnostics/tests/kt54587_2.kt
@@ -1,4 +1,3 @@ -// FIR_IDENTICAL package one fun test(f: NextMissing) {
diff --git a/compiler/testData/diagnostics/tests/kt60638.fir.kt b/compiler/testData/diagnostics/tests/kt60638.fir.kt index b0bdd7b..64d71f8 100644 --- a/compiler/testData/diagnostics/tests/kt60638.fir.kt +++ b/compiler/testData/diagnostics/tests/kt60638.fir.kt
@@ -5,5 +5,5 @@ val MyClass.isInterface get() = 4 fun usage(type: MyType) { - type.<!FUNCTION_EXPECTED!>isInterface<!>() + type.<!UNRESOLVED_REFERENCE!>isInterface<!>() }
diff --git a/compiler/testData/diagnostics/tests/operatorRem/DeprecatedModAssignOperatorConventions.fir.kt b/compiler/testData/diagnostics/tests/operatorRem/DeprecatedModAssignOperatorConventions.fir.kt index 09bbf74..f326f58 100644 --- a/compiler/testData/diagnostics/tests/operatorRem/DeprecatedModAssignOperatorConventions.fir.kt +++ b/compiler/testData/diagnostics/tests/operatorRem/DeprecatedModAssignOperatorConventions.fir.kt
@@ -29,7 +29,7 @@ oldAndNew %= 1 val onlyOld = OnlyOld() - onlyOld <!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>%=<!> 1 + onlyOld <!UNRESOLVED_REFERENCE!>%=<!> 1 val onlyNew = OnlyNew() onlyNew %= 1
diff --git a/compiler/testData/diagnostics/tests/operatorRem/DeprecatedModOperatorConventions.fir.kt b/compiler/testData/diagnostics/tests/operatorRem/DeprecatedModOperatorConventions.fir.kt index d47fde2..027dc24 100644 --- a/compiler/testData/diagnostics/tests/operatorRem/DeprecatedModOperatorConventions.fir.kt +++ b/compiler/testData/diagnostics/tests/operatorRem/DeprecatedModOperatorConventions.fir.kt
@@ -26,7 +26,7 @@ fun test() { OldAndNew() % 1 - OnlyOld() <!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>%<!> 1 + OnlyOld() <!UNRESOLVED_REFERENCE!>%<!> 1 OnlyNew() % 1 Sample() % 1
diff --git a/compiler/testData/diagnostics/tests/operatorRem/deprecatedModConvention.fir.kt b/compiler/testData/diagnostics/tests/operatorRem/deprecatedModConvention.fir.kt index 9010223..a673f6d 100644 --- a/compiler/testData/diagnostics/tests/operatorRem/deprecatedModConvention.fir.kt +++ b/compiler/testData/diagnostics/tests/operatorRem/deprecatedModConvention.fir.kt
@@ -25,11 +25,11 @@ fun foo() { ModAndRem % 1 - OldMod <!NONE_APPLICABLE!>%<!> 1 + OldMod <!UNRESOLVED_REFERENCE!>%<!> 1 ModAndRemExtension % 1 - ModExtension <!NONE_APPLICABLE!>%<!> 1 + ModExtension <!UNRESOLVED_REFERENCE!>%<!> 1 ModMemberAndRemExtension % 1
diff --git a/compiler/testData/diagnostics/tests/operatorRem/doNotResolveToInapplicableRem.fir.kt b/compiler/testData/diagnostics/tests/operatorRem/doNotResolveToInapplicableRem.fir.kt index ad40652..153505a 100644 --- a/compiler/testData/diagnostics/tests/operatorRem/doNotResolveToInapplicableRem.fir.kt +++ b/compiler/testData/diagnostics/tests/operatorRem/doNotResolveToInapplicableRem.fir.kt
@@ -9,5 +9,5 @@ operator fun RemExtension.rem(x: Int) {} fun foo() { - OldMod <!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>%<!> 123 + OldMod <!UNRESOLVED_REFERENCE!>%<!> 123 }
diff --git a/compiler/testData/diagnostics/tests/operatorsOverloading/PropertyInvoke.fir.kt b/compiler/testData/diagnostics/tests/operatorsOverloading/PropertyInvoke.fir.kt index dbfade0..41ef6df 100644 --- a/compiler/testData/diagnostics/tests/operatorsOverloading/PropertyInvoke.fir.kt +++ b/compiler/testData/diagnostics/tests/operatorsOverloading/PropertyInvoke.fir.kt
@@ -74,7 +74,7 @@ val useNotContains = 1 <!NOT_FUNCTION_AS_OPERATOR, NOT_FUNCTION_AS_OPERATOR!>!in<!> e val E.invoke: I get() = I() -val useInvoke = <!NONE_APPLICABLE!>e<!>() +val useInvoke = <!UNRESOLVED_REFERENCE!>e<!>() val E.rangeTo: I get() = I() val useRangeTo = e <!NOT_FUNCTION_AS_OPERATOR!>..<!> 3
diff --git a/compiler/testData/diagnostics/tests/regressions/kt5362.fir.kt b/compiler/testData/diagnostics/tests/regressions/kt5362.fir.kt new file mode 100644 index 0000000..a1eecf3 --- /dev/null +++ b/compiler/testData/diagnostics/tests/regressions/kt5362.fir.kt
@@ -0,0 +1,30 @@ +// KT-5362 Compiler crashes on access to extension method from nested class +class Outer { + class Nested{ + fun foo(s: String) = s.<!UNRESOLVED_REFERENCE!>extension<!>() + } + + private fun String.extension(): String = this +} + +// EA-64302 - UOE: CodegenContext.getOuterExpression +fun Activity.toast() = Unit +class Activity(){ + class Fragment{ + fun call() = <!UNRESOLVED_REFERENCE!>toast<!>() + } +} + +// KT-8814 No error in IDE for invalid invoke of OuterClass.()->Unit in static nested class +public class Manager { + fun task(callback: Manager.() -> Unit): Task { + val task = Task(callback) + return task + } + + class Task(val callback: Manager.() -> Unit) : Runnable { + override public fun run() { + callback<!NO_VALUE_FOR_PARAMETER!>()<!> // Manager is not accessible here, but no error is shown + } + } +}
diff --git a/compiler/testData/diagnostics/tests/regressions/kt5362.kt b/compiler/testData/diagnostics/tests/regressions/kt5362.kt index b263503..86b8206 100644 --- a/compiler/testData/diagnostics/tests/regressions/kt5362.kt +++ b/compiler/testData/diagnostics/tests/regressions/kt5362.kt
@@ -1,4 +1,3 @@ -// FIR_IDENTICAL // KT-5362 Compiler crashes on access to extension method from nested class class Outer { class Nested{ @@ -28,4 +27,4 @@ callback<!NO_VALUE_FOR_PARAMETER!>()<!> // Manager is not accessible here, but no error is shown } } -} \ No newline at end of file +}
diff --git a/compiler/testData/diagnostics/tests/resolve/invoke/errors/wrongReceiverTypeForInvoke.fir.kt b/compiler/testData/diagnostics/tests/resolve/invoke/errors/wrongReceiverTypeForInvoke.fir.kt index ed27bf0..ae14c32 100644 --- a/compiler/testData/diagnostics/tests/resolve/invoke/errors/wrongReceiverTypeForInvoke.fir.kt +++ b/compiler/testData/diagnostics/tests/resolve/invoke/errors/wrongReceiverTypeForInvoke.fir.kt
@@ -3,7 +3,7 @@ fun String.invoke(i: Int) {} fun foo(i: Int) { - <!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>i<!>(1) + <!UNRESOLVED_REFERENCE!>i<!>(1) <!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>1<!>(1) }
diff --git a/compiler/testData/diagnostics/tests/resolve/invoke/functionExpectedWhenSeveralInvokesExist.fir.kt b/compiler/testData/diagnostics/tests/resolve/invoke/functionExpectedWhenSeveralInvokesExist.fir.kt index 2d05367..b81a108 100644 --- a/compiler/testData/diagnostics/tests/resolve/invoke/functionExpectedWhenSeveralInvokesExist.fir.kt +++ b/compiler/testData/diagnostics/tests/resolve/invoke/functionExpectedWhenSeveralInvokesExist.fir.kt
@@ -6,8 +6,8 @@ class SomeClass fun test(identifier: SomeClass, fn: String.() -> Unit) { - <!NONE_APPLICABLE!>identifier<!>() - <!NONE_APPLICABLE!>identifier<!>(123) - <!NONE_APPLICABLE!>identifier<!>(1, 2) + <!UNRESOLVED_REFERENCE!>identifier<!>() + <!UNRESOLVED_REFERENCE!>identifier<!>(123) + <!UNRESOLVED_REFERENCE!>identifier<!>(1, 2) 1.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>fn<!>() }
diff --git a/compiler/testData/diagnostics/tests/resolve/invoke/invokeOnVariableWithExtensionFunctionType.fir.kt b/compiler/testData/diagnostics/tests/resolve/invoke/invokeOnVariableWithExtensionFunctionType.fir.kt index acbbfa5..91c5cb4 100644 --- a/compiler/testData/diagnostics/tests/resolve/invoke/invokeOnVariableWithExtensionFunctionType.fir.kt +++ b/compiler/testData/diagnostics/tests/resolve/invoke/invokeOnVariableWithExtensionFunctionType.fir.kt
@@ -16,7 +16,7 @@ b.(foo)() - (b.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>foo<!>)<!NO_VALUE_FOR_PARAMETER!>()<!> + (<!UNRESOLVED_REFERENCE!>b.<!FUNCTION_CALL_EXPECTED!>foo<!><!>)() foo(b) (foo)(b) @@ -24,7 +24,7 @@ with(b) { a.foo<!NO_VALUE_FOR_PARAMETER!>()<!> - <!TOO_MANY_ARGUMENTS!>a<!>.(<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>foo<!>)() + a.(<!UNRESOLVED_REFERENCE!>foo<!>)() (a.foo)()
diff --git a/compiler/testData/diagnostics/tests/resolve/invoke/reportFunctionExpectedWhenOneInvokeExist.fir.kt b/compiler/testData/diagnostics/tests/resolve/invoke/reportFunctionExpectedWhenOneInvokeExist.fir.kt index dfcea7a..360f6d4 100644 --- a/compiler/testData/diagnostics/tests/resolve/invoke/reportFunctionExpectedWhenOneInvokeExist.fir.kt +++ b/compiler/testData/diagnostics/tests/resolve/invoke/reportFunctionExpectedWhenOneInvokeExist.fir.kt
@@ -5,8 +5,8 @@ class SomeClass fun test(identifier: SomeClass, fn: String.() -> Unit) { - <!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>identifier<!>() - <!OPERATOR_MODIFIER_REQUIRED!>identifier<!>(<!TOO_MANY_ARGUMENTS!>123<!>) - <!OPERATOR_MODIFIER_REQUIRED!>identifier<!>(<!TOO_MANY_ARGUMENTS!>1<!>, <!TOO_MANY_ARGUMENTS!>2<!>) + <!UNRESOLVED_REFERENCE!>identifier<!>() + <!UNRESOLVED_REFERENCE!>identifier<!>(123) + <!UNRESOLVED_REFERENCE!>identifier<!>(1, 2) 1.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>fn<!>() }
diff --git a/compiler/testData/diagnostics/tests/resolve/nestedCalls/manyInapplicableCandidatesWithLambdas.fir.kt b/compiler/testData/diagnostics/tests/resolve/nestedCalls/manyInapplicableCandidatesWithLambdas.fir.kt index 692ae8d..b6241f2 100644 --- a/compiler/testData/diagnostics/tests/resolve/nestedCalls/manyInapplicableCandidatesWithLambdas.fir.kt +++ b/compiler/testData/diagnostics/tests/resolve/nestedCalls/manyInapplicableCandidatesWithLambdas.fir.kt
@@ -19,20 +19,20 @@ // `bar` calls are inapplicable since both E nor D aren't proper receivers // But prior to this change, every lambda was analyzed repeatedly for every candidate // Thus, the resulting time was exponential - <!NONE_APPLICABLE!>bar<!> <!NONE_APPLICABLE!>{ - <!NONE_APPLICABLE!>bar<!> <!NONE_APPLICABLE!>{ - <!NONE_APPLICABLE!>bar<!> <!NONE_APPLICABLE!>{ - <!NONE_APPLICABLE!>bar<!> <!NONE_APPLICABLE!>{ - <!NONE_APPLICABLE!>bar<!> <!NONE_APPLICABLE!>{ - <!NONE_APPLICABLE!>bar<!> <!NONE_APPLICABLE!>{ - <!NONE_APPLICABLE!>bar<!> <!NONE_APPLICABLE!>{ - <!NONE_APPLICABLE!>bar<!> <!NONE_APPLICABLE!>{ - <!NONE_APPLICABLE!>bar<!> <!NONE_APPLICABLE!>{ - <!NONE_APPLICABLE!>bar<!> <!NONE_APPLICABLE!>{ - <!NONE_APPLICABLE!>bar<!> <!NONE_APPLICABLE!>{ - <!NONE_APPLICABLE!>bar<!> <!NONE_APPLICABLE!>{ - <!NONE_APPLICABLE!>bar<!> <!NONE_APPLICABLE!>{ - <!NONE_APPLICABLE!>bar<!> { + <!UNRESOLVED_REFERENCE!>bar<!> <!UNRESOLVED_REFERENCE!>{ + <!UNRESOLVED_REFERENCE!>bar<!> <!UNRESOLVED_REFERENCE!>{ + <!UNRESOLVED_REFERENCE!>bar<!> <!UNRESOLVED_REFERENCE!>{ + <!UNRESOLVED_REFERENCE!>bar<!> <!UNRESOLVED_REFERENCE!>{ + <!UNRESOLVED_REFERENCE!>bar<!> <!UNRESOLVED_REFERENCE!>{ + <!UNRESOLVED_REFERENCE!>bar<!> <!UNRESOLVED_REFERENCE!>{ + <!UNRESOLVED_REFERENCE!>bar<!> <!UNRESOLVED_REFERENCE!>{ + <!UNRESOLVED_REFERENCE!>bar<!> <!UNRESOLVED_REFERENCE!>{ + <!UNRESOLVED_REFERENCE!>bar<!> <!UNRESOLVED_REFERENCE!>{ + <!UNRESOLVED_REFERENCE!>bar<!> <!UNRESOLVED_REFERENCE!>{ + <!UNRESOLVED_REFERENCE!>bar<!> <!UNRESOLVED_REFERENCE!>{ + <!UNRESOLVED_REFERENCE!>bar<!> <!UNRESOLVED_REFERENCE!>{ + <!UNRESOLVED_REFERENCE!>bar<!> <!UNRESOLVED_REFERENCE!>{ + <!UNRESOLVED_REFERENCE!>bar<!> { } }<!>
diff --git a/compiler/testData/diagnostics/tests/resolve/wrongReceiver.fir.kt b/compiler/testData/diagnostics/tests/resolve/wrongReceiver.fir.kt index ca051ac..82a436c 100644 --- a/compiler/testData/diagnostics/tests/resolve/wrongReceiver.fir.kt +++ b/compiler/testData/diagnostics/tests/resolve/wrongReceiver.fir.kt
@@ -10,11 +10,11 @@ fun String.test() { <!EXPRESSION_EXPECTED_PACKAGE_FOUND!>some<!> some.A() - "".<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>some<!> + "".<!UNRESOLVED_REFERENCE!>some<!> - <!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>foo<!> - "".<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>foo<!> + <!UNRESOLVED_REFERENCE!>foo<!> + "".<!UNRESOLVED_REFERENCE!>foo<!> - <!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>extFun<!>() - "".<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>extFun<!>() + <!UNRESOLVED_REFERENCE!>extFun<!>() + "".<!UNRESOLVED_REFERENCE!>extFun<!>() }
diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/neg/10.fir.kt b/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/neg/10.fir.kt index a6cc597..8ff8997 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/neg/10.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/neg/10.fir.kt
@@ -293,7 +293,7 @@ <!OVERLOAD_RESOLUTION_AMBIGUITY!>println<!>(value_2?.<!UNRESOLVED_REFERENCE!>toByte<!>()) } if (funWithReturnsFalse(value_1 !is Float? || value_1 == null || value_2 == null)) { - println(value_1.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>dec<!>()) + <!OVERLOAD_RESOLUTION_AMBIGUITY!>println<!>(value_1.<!UNRESOLVED_REFERENCE!>dec<!>()) <!OVERLOAD_RESOLUTION_AMBIGUITY!>println<!>(value_2?.<!UNRESOLVED_REFERENCE!>toByte<!>()) } if (funWithReturnsNotNull(value_1 !is String || value_2 !is Number) == null) { @@ -309,7 +309,7 @@ // TESTCASE NUMBER: 13 fun case_13(value_1: Any?, value_2: Any?) { if (!funWithReturnsTrueAndInvertCondition(value_1 is Float? && value_1 != null && value_2 != null)) { - println(value_1.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>dec<!>()) + <!OVERLOAD_RESOLUTION_AMBIGUITY!>println<!>(value_1.<!UNRESOLVED_REFERENCE!>dec<!>()) <!OVERLOAD_RESOLUTION_AMBIGUITY!>println<!>(value_2?.<!UNRESOLVED_REFERENCE!>toByte<!>()) } if (funWithReturnsFalseAndInvertCondition(value_1 is String && value_2 is Number)) { @@ -329,7 +329,7 @@ <!OVERLOAD_RESOLUTION_AMBIGUITY!>println<!>(value_2?.<!UNRESOLVED_REFERENCE!>toByte<!>()) } if (funWithReturnsNotNull(value_1 is Float? && value_1 != null && value_2 != null) == null) { - println(value_1.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>dec<!>()) + <!OVERLOAD_RESOLUTION_AMBIGUITY!>println<!>(value_1.<!UNRESOLVED_REFERENCE!>dec<!>()) <!OVERLOAD_RESOLUTION_AMBIGUITY!>println<!>(value_2?.<!UNRESOLVED_REFERENCE!>toByte<!>()) } if (funWithReturnsNullAndInvertCondition(value_1 is String && value_2 is Number) != null) { @@ -341,7 +341,7 @@ <!OVERLOAD_RESOLUTION_AMBIGUITY!>println<!>(value_2?.<!UNRESOLVED_REFERENCE!>toByte<!>()) } if (funWithReturnsNull(value_1 is Float? && value_1 != null && value_2 != null) != null) { - println(value_1.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>dec<!>()) + <!OVERLOAD_RESOLUTION_AMBIGUITY!>println<!>(value_1.<!UNRESOLVED_REFERENCE!>dec<!>()) <!OVERLOAD_RESOLUTION_AMBIGUITY!>println<!>(value_2?.<!UNRESOLVED_REFERENCE!>toByte<!>()) } } @@ -353,22 +353,22 @@ fun case_14(value_1: Any?, value_2: Number?) { val o = case_14_class() if (!funWithReturnsTrueAndInvertCondition(value_1 is Float? && value_1 != null && value_2 != null && o.prop_1 != null)) { - println(value_1.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>dec<!>()) + <!OVERLOAD_RESOLUTION_AMBIGUITY!>println<!>(value_1.<!UNRESOLVED_REFERENCE!>dec<!>()) println(value_2?.toByte()) println(o.prop_1<!UNSAFE_CALL!>.<!>plus(3)) } if (funWithReturnsFalse(value_1 !is Float? || value_1 == null || value_2 == null || o.prop_1 == null || this.prop_1 == null)) { - println(value_1.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>dec<!>()) + <!OVERLOAD_RESOLUTION_AMBIGUITY!>println<!>(value_1.<!UNRESOLVED_REFERENCE!>dec<!>()) println(value_2?.toByte()) println(o.prop_1<!UNSAFE_CALL!>.<!>plus(3)) } if (funWithReturnsNotNull(value_1 !is Float? || value_1 == null || value_2 == null || o.prop_1 == null || this.prop_1 == null) == null) { - println(value_1.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>dec<!>()) + <!OVERLOAD_RESOLUTION_AMBIGUITY!>println<!>(value_1.<!UNRESOLVED_REFERENCE!>dec<!>()) println(value_2?.toByte()) println(o.prop_1<!UNSAFE_CALL!>.<!>plus(3)) } if (funWithReturnsNull(value_1 !is Float? || value_1 == null || value_2 == null || o.prop_1 == null || this.prop_1 == null) != null) { - println(value_1.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>dec<!>()) + <!OVERLOAD_RESOLUTION_AMBIGUITY!>println<!>(value_1.<!UNRESOLVED_REFERENCE!>dec<!>()) println(value_2?.toByte()) println(o.prop_1<!UNSAFE_CALL!>.<!>plus(3)) } @@ -422,25 +422,25 @@ fun case_17(value_1: Any?, value_2: Number?) { val o = case_17_class() if (contracts.case_17_1(value_1, value_2, o.prop_1, this.prop_1)) { - println(value_1.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>dec<!>()) + <!OVERLOAD_RESOLUTION_AMBIGUITY!>println<!>(value_1.<!UNRESOLVED_REFERENCE!>dec<!>()) println(value_2?.toByte()) println(o.prop_1<!UNSAFE_CALL!>.<!>plus(3)) println(this.prop_1<!UNSAFE_CALL!>.<!>plus(3)) } if (contracts.case_17_2(value_1, value_2, o.prop_1, this.prop_1)) { - println(value_1.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>dec<!>()) + <!OVERLOAD_RESOLUTION_AMBIGUITY!>println<!>(value_1.<!UNRESOLVED_REFERENCE!>dec<!>()) println(value_2?.toByte()) println(o.prop_1<!UNSAFE_CALL!>.<!>plus(3)) println(this.prop_1<!UNSAFE_CALL!>.<!>plus(3)) } if (contracts.case_17_3(value_1, value_2, o.prop_1, this.prop_1) == null) { - println(value_1.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>dec<!>()) + <!OVERLOAD_RESOLUTION_AMBIGUITY!>println<!>(value_1.<!UNRESOLVED_REFERENCE!>dec<!>()) println(value_2?.toByte()) println(o.prop_1<!UNSAFE_CALL!>.<!>plus(3)) println(this.prop_1<!UNSAFE_CALL!>.<!>plus(3)) } if (contracts.case_17_4(value_1, value_2, o.prop_1, this.prop_1) != null) { - println(value_1.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>dec<!>()) + <!OVERLOAD_RESOLUTION_AMBIGUITY!>println<!>(value_1.<!UNRESOLVED_REFERENCE!>dec<!>()) println(value_2?.toByte()) println(o.prop_1<!UNSAFE_CALL!>.<!>plus(3)) println(this.prop_1<!UNSAFE_CALL!>.<!>plus(3))
diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/neg/2.fir.kt b/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/neg/2.fir.kt index 0724e0f..e5d86fa 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/neg/2.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/neg/2.fir.kt
@@ -34,7 +34,7 @@ // TESTCASE NUMBER: 4 fun case_4(value_1: Any?, value_2: Number?) { funWithReturns(value_1 !is Float? || value_1 == null || value_2 == null) - println(value_1.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>dec<!>()) + <!OVERLOAD_RESOLUTION_AMBIGUITY!>println<!>(value_1.<!UNRESOLVED_REFERENCE!>dec<!>()) println(value_2?.toByte()) } @@ -44,7 +44,7 @@ fun case_5(value_1: Any?, value_2: Number?) { val o = case_5_class() funWithReturns(value_1 !is Float? || value_1 == null || value_2 == null || o.prop_1 == null) - println(value_1.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>dec<!>()) + <!OVERLOAD_RESOLUTION_AMBIGUITY!>println<!>(value_1.<!UNRESOLVED_REFERENCE!>dec<!>()) println(value_2?.toByte()) println(o.prop_1<!UNSAFE_CALL!>.<!>plus(3)) } @@ -113,19 +113,19 @@ // TESTCASE NUMBER: 9 fun case_9(value_1: Any?, value_2: Number?) { if (funWithReturnsTrue(value_1 !is Float? || value_1 == null || value_2 == null)) { - println(value_1.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>dec<!>()) + <!OVERLOAD_RESOLUTION_AMBIGUITY!>println<!>(value_1.<!UNRESOLVED_REFERENCE!>dec<!>()) println(value_2?.toByte()) } if (!funWithReturnsFalse(value_1 !is Float? || value_1 == null || value_2 == null)) { - println(value_1.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>dec<!>()) + <!OVERLOAD_RESOLUTION_AMBIGUITY!>println<!>(value_1.<!UNRESOLVED_REFERENCE!>dec<!>()) println(value_2?.toByte()) } if (funWithReturnsNotNull(value_1 is Float? && value_1 != null && value_2 != null) == null) { - println(value_1.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>dec<!>()) + <!OVERLOAD_RESOLUTION_AMBIGUITY!>println<!>(value_1.<!UNRESOLVED_REFERENCE!>dec<!>()) println(value_2?.toByte()) } if (funWithReturnsNull(value_1 is Float? && value_1 != null && value_2 != null) != null) { - println(value_1.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>dec<!>()) + <!OVERLOAD_RESOLUTION_AMBIGUITY!>println<!>(value_1.<!UNRESOLVED_REFERENCE!>dec<!>()) println(value_2?.toByte()) } } @@ -137,22 +137,22 @@ fun case_10(value_1: Any?, value_2: Number?) { val o = case_10_class() if (funWithReturnsTrue(value_1 !is Float? || value_1 == null || value_2 == null || o.prop_1 == null || this.prop_1 == null)) { - println(value_1.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>dec<!>()) + <!OVERLOAD_RESOLUTION_AMBIGUITY!>println<!>(value_1.<!UNRESOLVED_REFERENCE!>dec<!>()) println(value_2?.toByte()) println(o.prop_1<!UNSAFE_CALL!>.<!>plus(3)) } if (!funWithReturnsFalse(value_1 !is Float? || value_1 == null || value_2 == null || o.prop_1 == null || this.prop_1 == null)) { - println(value_1.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>dec<!>()) + <!OVERLOAD_RESOLUTION_AMBIGUITY!>println<!>(value_1.<!UNRESOLVED_REFERENCE!>dec<!>()) println(value_2?.toByte()) println(o.prop_1<!UNSAFE_CALL!>.<!>plus(3)) } if (funWithReturnsNotNull(value_1 !is Float? || value_1 == null || value_2 == null || o.prop_1 == null || this.prop_1 == null) != null) { - println(value_1.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>dec<!>()) + <!OVERLOAD_RESOLUTION_AMBIGUITY!>println<!>(value_1.<!UNRESOLVED_REFERENCE!>dec<!>()) println(value_2?.toByte()) println(o.prop_1<!UNSAFE_CALL!>.<!>plus(3)) } if (funWithReturnsNull(value_1 !is Float? || value_1 == null || value_2 == null || o.prop_1 == null || this.prop_1 == null) == null) { - println(value_1.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>dec<!>()) + <!OVERLOAD_RESOLUTION_AMBIGUITY!>println<!>(value_1.<!UNRESOLVED_REFERENCE!>dec<!>()) println(value_2?.toByte()) println(o.prop_1<!UNSAFE_CALL!>.<!>plus(3)) } @@ -164,5 +164,5 @@ funWithReturnsAndInvertCondition(value_1 !is String? || value_2 !is Number && value_3 !is Float) println(value_1!!.length) <!OVERLOAD_RESOLUTION_AMBIGUITY!>println<!>(value_2.<!UNRESOLVED_REFERENCE!>toByte<!>()) - println(value_3.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>dec<!>()) + <!OVERLOAD_RESOLUTION_AMBIGUITY!>println<!>(value_3.<!UNRESOLVED_REFERENCE!>dec<!>()) }
diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/neg/3.fir.kt b/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/neg/3.fir.kt index d166fc9..75d2fa3 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/neg/3.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/neg/3.fir.kt
@@ -111,7 +111,7 @@ fun case_3(value_1: Any?, value_2: Number?) { val o = case_3_class() contracts.case_3(value_1, value_2, o.prop_1, this.prop_1) - println(value_1.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>dec<!>()) + <!OVERLOAD_RESOLUTION_AMBIGUITY!>println<!>(value_1.<!UNRESOLVED_REFERENCE!>dec<!>()) println(value_2?.toByte()) println(o.prop_1<!UNSAFE_CALL!>.<!>plus(3)) } @@ -164,22 +164,22 @@ fun case_6(value_1: Any?, value_2: Number?) { val o = case_6_class() if (contracts.case_6_1(value_1, value_2, o.prop_1, this.prop_1)) { - println(value_1.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>dec<!>()) + <!OVERLOAD_RESOLUTION_AMBIGUITY!>println<!>(value_1.<!UNRESOLVED_REFERENCE!>dec<!>()) println(value_2?.toByte()) println(o.prop_1<!UNSAFE_CALL!>.<!>plus(3)) } if (!contracts.case_6_2(value_1, value_2, o.prop_1, this.prop_1)) { - println(value_1.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>dec<!>()) + <!OVERLOAD_RESOLUTION_AMBIGUITY!>println<!>(value_1.<!UNRESOLVED_REFERENCE!>dec<!>()) println(value_2?.toByte()) println(o.prop_1<!UNSAFE_CALL!>.<!>plus(3)) } if (contracts.case_6_3(value_1, value_2, o.prop_1, this.prop_1) == null) { - println(value_1.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>dec<!>()) + <!OVERLOAD_RESOLUTION_AMBIGUITY!>println<!>(value_1.<!UNRESOLVED_REFERENCE!>dec<!>()) println(value_2?.toByte()) println(o.prop_1<!UNSAFE_CALL!>.<!>plus(3)) } if (contracts.case_6_4(value_1, value_2, o.prop_1, this.prop_1) != null) { - println(value_1.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>dec<!>()) + <!OVERLOAD_RESOLUTION_AMBIGUITY!>println<!>(value_1.<!UNRESOLVED_REFERENCE!>dec<!>()) println(value_2?.toByte()) println(o.prop_1<!UNSAFE_CALL!>.<!>plus(3)) }
diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/6.fir.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/6.fir.kt index c872cb3..e7fe702 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/6.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/6.fir.kt
@@ -1016,7 +1016,7 @@ <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float?")!>b<!> if (a != z) { <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function1<kotlin.Float, kotlin.Int?>? & kotlin.Function1<kotlin.Float, kotlin.Int?>")!>a<!> - <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function1<kotlin.Float, kotlin.Int?>? & kotlin.Function1<kotlin.Float, kotlin.Int?>")!>a<!>.<!UNRESOLVED_REFERENCE!>java<!> + <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function1<kotlin.Float, kotlin.Int?>? & kotlin.Function1<kotlin.Float, kotlin.Int?>")!>a<!>.<!CANNOT_INFER_PARAMETER_TYPE, UNRESOLVED_REFERENCE_WRONG_RECEIVER!>java<!> } } }
diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/unresolvedDelegateExpression.fir.txt b/plugins/kapt3/kapt3-compiler/testData/converter/unresolvedDelegateExpression.fir.txt index 891b6398..6a298fa 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/unresolvedDelegateExpression.fir.txt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/unresolvedDelegateExpression.fir.txt
@@ -4,7 +4,7 @@ * // signature: <init>()V * public constructor() * - * // field: a$delegate:Ljava/lang/String; + * // field: a$delegate:Lerror/NonExistentClass; * // getter: getA()Ljava/lang/String; * // synthetic method for annotations: getA$annotations()V * public final (* delegated *) val a: kotlin/String @@ -17,7 +17,7 @@ @kotlin.Suppress(names = {"UNRESOLVED_REFERENCE"}) public final class B implements NonExisting { @org.jetbrains.annotations.NotNull() - private final java.lang.String a$delegate = null; + private final error.NonExistentClass a$delegate = null; public B() { super();