diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/results/OverloadingConflictResolver.java b/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/results/OverloadingConflictResolver.java index 0914706b350..69fd0ec1f14 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/results/OverloadingConflictResolver.java +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/results/OverloadingConflictResolver.java @@ -23,6 +23,7 @@ import org.jetbrains.annotations.Nullable; import org.jetbrains.kotlin.builtins.KotlinBuiltIns; import org.jetbrains.kotlin.descriptors.*; import org.jetbrains.kotlin.resolve.OverrideResolver; +import org.jetbrains.kotlin.resolve.calls.context.CheckArgumentTypesMode; import org.jetbrains.kotlin.resolve.calls.model.MutableResolvedCall; import org.jetbrains.kotlin.resolve.calls.model.ResolvedCall; import org.jetbrains.kotlin.resolve.calls.model.VariableAsFunctionResolvedCall; @@ -43,7 +44,8 @@ public class OverloadingConflictResolver { @Nullable public MutableResolvedCall findMaximallySpecific( @NotNull Set> candidates, - boolean discriminateGenericDescriptors + boolean discriminateGenericDescriptors, + @NotNull CheckArgumentTypesMode checkArgumentsMode ) { // Different smartcasts may lead to the same candidate descriptor wrapped into different ResolvedCallImpl objects Set> maximallySpecific = new THashSet>(new TObjectHashingStrategy>() { @@ -58,7 +60,7 @@ public class OverloadingConflictResolver { } }); for (MutableResolvedCall candidateCall : candidates) { - if (isMaximallySpecific(candidateCall, candidates, discriminateGenericDescriptors)) { + if (isMaximallySpecific(candidateCall, candidates, discriminateGenericDescriptors, checkArgumentsMode)) { maximallySpecific.add(candidateCall); } } @@ -68,7 +70,8 @@ public class OverloadingConflictResolver { private boolean isMaximallySpecific( @NotNull MutableResolvedCall candidateCall, @NotNull Set> candidates, - boolean discriminateGenericDescriptors + boolean discriminateGenericDescriptors, + @NotNull CheckArgumentTypesMode checkArgumentsMode ) { D me = candidateCall.getResultingDescriptor(); @@ -85,13 +88,13 @@ public class OverloadingConflictResolver { D other = otherCall.getResultingDescriptor(); if (other == me) continue; - if (definitelyNotMaximallySpecific(me, other, discriminateGenericDescriptors)) { + if (definitelyNotMaximallySpecific(me, other, discriminateGenericDescriptors, checkArgumentsMode)) { if (!isInvoke) return false; assert otherCall instanceof VariableAsFunctionResolvedCall : "'invoke' candidate goes with usual one: " + candidateCall + otherCall; ResolvedCall otherVariableCall = ((VariableAsFunctionResolvedCall) otherCall).getVariableCall(); - if (definitelyNotMaximallySpecific(variable, otherVariableCall.getResultingDescriptor(), discriminateGenericDescriptors)) { + if (definitelyNotMaximallySpecific(variable, otherVariableCall.getResultingDescriptor(), discriminateGenericDescriptors, checkArgumentsMode)) { return false; } } @@ -99,8 +102,14 @@ public class OverloadingConflictResolver { return true; } - private boolean definitelyNotMaximallySpecific(D me, D other, boolean discriminateGenericDescriptors) { - return !moreSpecific(me, other, discriminateGenericDescriptors) || moreSpecific(other, me, discriminateGenericDescriptors); + private boolean definitelyNotMaximallySpecific( + D me, + D other, + boolean discriminateGenericDescriptors, + @NotNull CheckArgumentTypesMode checkArgumentsMode + ) { + return !moreSpecific(me, other, discriminateGenericDescriptors, checkArgumentsMode) || + moreSpecific(other, me, discriminateGenericDescriptors, checkArgumentsMode); } /** @@ -113,8 +122,11 @@ public class OverloadingConflictResolver { private boolean moreSpecific( Descriptor f, Descriptor g, - boolean discriminateGenericDescriptors + boolean discriminateGenericDescriptors, + @NotNull CheckArgumentTypesMode checkArgumentsMode ) { + boolean resolvingCallableReference = checkArgumentsMode == CheckArgumentTypesMode.CHECK_CALLABLE_TYPE; + if (f.getContainingDeclaration() instanceof ScriptDescriptor && g.getContainingDeclaration() instanceof ScriptDescriptor) { ScriptDescriptor fs = (ScriptDescriptor) f.getContainingDeclaration(); ScriptDescriptor gs = (ScriptDescriptor) g.getContainingDeclaration(); @@ -131,11 +143,10 @@ public class OverloadingConflictResolver { if (isGenericF && !isGenericG) return false; if (isGenericF && isGenericG) { - return moreSpecific(BoundsSubstitutor.substituteBounds(f), BoundsSubstitutor.substituteBounds(g), false); + return moreSpecific(BoundsSubstitutor.substituteBounds(f), BoundsSubstitutor.substituteBounds(g), false, checkArgumentsMode); } } - if (OverrideResolver.overrides(f, g)) return true; if (OverrideResolver.overrides(g, f)) return false; @@ -154,11 +165,13 @@ public class OverloadingConflictResolver { boolean fIsVararg = isVariableArity(fParams); boolean gIsVararg = isVariableArity(gParams); + if (resolvingCallableReference && fIsVararg != gIsVararg) return false; if (!fIsVararg && gIsVararg) return true; if (fIsVararg && !gIsVararg) return false; if (!fIsVararg && !gIsVararg) { - if (fSize > gSize) return false; + if (resolvingCallableReference && fSize != gSize) return false; + if (!resolvingCallableReference && fSize > gSize) return false; for (int i = 0; i < fSize; i++) { ValueParameterDescriptor fParam = fParams.get(i); @@ -229,12 +242,12 @@ public class OverloadingConflictResolver { return parameterDescriptor.getType(); } - private boolean isVariableArity(List fParams) { + private static boolean isVariableArity(List fParams) { int fSize = fParams.size(); return fSize > 0 && fParams.get(fSize - 1).getVarargElementType() != null; } - private boolean isGeneric(CallableDescriptor f) { + private static boolean isGeneric(CallableDescriptor f) { return !f.getOriginal().getTypeParameters().isEmpty(); } diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/results/ResolutionResultsHandler.java b/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/results/ResolutionResultsHandler.java index a6f3227ec94..8b7ae6ec474 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/results/ResolutionResultsHandler.java +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/results/ResolutionResultsHandler.java @@ -48,8 +48,6 @@ public class ResolutionResultsHandler { @NotNull TracingStrategy tracing, @NotNull Collection> candidates ) { - boolean resolveOverloads = context.checkArguments == CheckArgumentTypesMode.CHECK_VALUE_ARGUMENTS; // todo rename CheckArgumentTypesMode - Set> successfulCandidates = Sets.newLinkedHashSet(); Set> failedCandidates = Sets.newLinkedHashSet(); Set> incompleteCandidates = Sets.newLinkedHashSet(); @@ -73,10 +71,10 @@ public class ResolutionResultsHandler { // TODO : maybe it's better to filter overrides out first, and only then look for the maximally specific if (!successfulCandidates.isEmpty() || !incompleteCandidates.isEmpty()) { - return computeSuccessfulResult(context, tracing, successfulCandidates, incompleteCandidates, resolveOverloads); + return computeSuccessfulResult(context, tracing, successfulCandidates, incompleteCandidates, context.checkArguments); } else if (!failedCandidates.isEmpty()) { - return computeFailedResult(tracing, context.trace, failedCandidates, resolveOverloads); + return computeFailedResult(tracing, context.trace, failedCandidates, context.checkArguments); } if (!candidatesWithWrongReceiver.isEmpty()) { tracing.unresolvedReferenceWrongReceiver(context.trace, candidatesWithWrongReceiver); @@ -92,12 +90,12 @@ public class ResolutionResultsHandler { @NotNull TracingStrategy tracing, @NotNull Set> successfulCandidates, @NotNull Set> incompleteCandidates, - boolean resolveOverloads + @NotNull CheckArgumentTypesMode checkArgumentsMode ) { Set> successfulAndIncomplete = Sets.newLinkedHashSet(); successfulAndIncomplete.addAll(successfulCandidates); successfulAndIncomplete.addAll(incompleteCandidates); - OverloadResolutionResultsImpl results = chooseAndReportMaximallySpecific(successfulAndIncomplete, true, resolveOverloads); + OverloadResolutionResultsImpl results = chooseAndReportMaximallySpecific(successfulAndIncomplete, true, checkArgumentsMode); if (results.isSingleResult()) { MutableResolvedCall resultingCall = results.getResultingCall(); resultingCall.getTrace().moveAllMyDataTo(context.trace); @@ -131,7 +129,7 @@ public class ResolutionResultsHandler { @NotNull TracingStrategy tracing, @NotNull BindingTrace trace, @NotNull Set> failedCandidates, - boolean resolveOverloads + @NotNull CheckArgumentTypesMode checkArgumentsMode ) { if (failedCandidates.size() != 1) { // This is needed when there are several overloads some of which are OK but for nullability of the receiver, @@ -148,7 +146,7 @@ public class ResolutionResultsHandler { if (severityLevel.contains(ARGUMENTS_MAPPING_ERROR)) { return recordFailedInfo(tracing, trace, thisLevel); } - OverloadResolutionResultsImpl results = chooseAndReportMaximallySpecific(thisLevel, false, resolveOverloads); + OverloadResolutionResultsImpl results = chooseAndReportMaximallySpecific(thisLevel, false, checkArgumentsMode); return recordFailedInfo(tracing, trace, results.getResultingCalls()); } } @@ -189,7 +187,7 @@ public class ResolutionResultsHandler { private OverloadResolutionResultsImpl chooseAndReportMaximallySpecific( @NotNull Set> candidates, boolean discriminateGenerics, - boolean resolveOverloads + @NotNull CheckArgumentTypesMode checkArgumentsMode ) { if (candidates.size() == 1) { return OverloadResolutionResultsImpl.success(candidates.iterator().next()); @@ -199,18 +197,15 @@ public class ResolutionResultsHandler { if (noOverrides.size() == 1) { return OverloadResolutionResultsImpl.success(noOverrides.iterator().next()); } - else if (!resolveOverloads) { - return OverloadResolutionResultsImpl.ambiguity(noOverrides); - } - MutableResolvedCall maximallySpecific = overloadingConflictResolver.findMaximallySpecific(noOverrides, false); + MutableResolvedCall maximallySpecific = overloadingConflictResolver.findMaximallySpecific(noOverrides, false, checkArgumentsMode); if (maximallySpecific != null) { return OverloadResolutionResultsImpl.success(maximallySpecific); } if (discriminateGenerics) { MutableResolvedCall maximallySpecificGenericsDiscriminated = overloadingConflictResolver.findMaximallySpecific( - noOverrides, true); + noOverrides, true, checkArgumentsMode); if (maximallySpecificGenericsDiscriminated != null) { return OverloadResolutionResultsImpl.success(maximallySpecificGenericsDiscriminated); } diff --git a/compiler/testData/diagnostics/tests/callableReference/resolve/ambiguousWithVararg.kt b/compiler/testData/diagnostics/tests/callableReference/resolve/ambiguousWithVararg.kt new file mode 100644 index 00000000000..4cb5391aaed --- /dev/null +++ b/compiler/testData/diagnostics/tests/callableReference/resolve/ambiguousWithVararg.kt @@ -0,0 +1,16 @@ +// !DIAGNOSTICS: -UNUSED_PARAMETER + +fun fun1() {} +fun fun1(x: Int) {} + +val ref1 = ::fun1 + +fun fun2(vararg x: Int) {} +fun fun2(x: Int) {} + +val ref2 = ::fun2 + +fun fun3(x0: Int, vararg xs: Int) {} +fun fun3(x0: String, vararg xs: String) {} + +val ref3 = ::fun3 diff --git a/compiler/testData/diagnostics/tests/callableReference/resolve/ambiguousWithVararg.txt b/compiler/testData/diagnostics/tests/callableReference/resolve/ambiguousWithVararg.txt new file mode 100644 index 00000000000..0e34f8a125a --- /dev/null +++ b/compiler/testData/diagnostics/tests/callableReference/resolve/ambiguousWithVararg.txt @@ -0,0 +1,11 @@ +package + +public val ref1: [ERROR : Type for ::fun1] +public val ref2: [ERROR : Type for ::fun2] +public val ref3: [ERROR : Type for ::fun3] +public fun fun1(): kotlin.Unit +public fun fun1(/*0*/ x: kotlin.Int): kotlin.Unit +public fun fun2(/*0*/ x: kotlin.Int): kotlin.Unit +public fun fun2(/*0*/ vararg x: kotlin.Int /*kotlin.IntArray*/): kotlin.Unit +public fun fun3(/*0*/ x0: kotlin.Int, /*1*/ vararg xs: kotlin.Int /*kotlin.IntArray*/): kotlin.Unit +public fun fun3(/*0*/ x0: kotlin.String, /*1*/ vararg xs: kotlin.String /*kotlin.Array*/): kotlin.Unit diff --git a/compiler/testData/diagnostics/tests/callableReference/resolve/kt9601.kt b/compiler/testData/diagnostics/tests/callableReference/resolve/kt9601.kt new file mode 100644 index 00000000000..31a083c6212 --- /dev/null +++ b/compiler/testData/diagnostics/tests/callableReference/resolve/kt9601.kt @@ -0,0 +1,15 @@ +// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_EXPRESSION + +open class A +class B: A() + +fun A.foo() {} +fun B.foo() {} // more specific + +fun bar(a: Any) {} +fun bar(a: Int) {} // more specific + +fun test() { + B::foo + ::bar +} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/callableReference/resolve/kt9601.txt b/compiler/testData/diagnostics/tests/callableReference/resolve/kt9601.txt new file mode 100644 index 00000000000..9b3388d49f4 --- /dev/null +++ b/compiler/testData/diagnostics/tests/callableReference/resolve/kt9601.txt @@ -0,0 +1,21 @@ +package + +public fun bar(/*0*/ a: kotlin.Any): kotlin.Unit +public fun bar(/*0*/ a: kotlin.Int): kotlin.Unit +public fun test(): kotlin.Unit +public fun A.foo(): kotlin.Unit +public fun B.foo(): kotlin.Unit + +public open class A { + public constructor A() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} + +public final class B : A { + public constructor B() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} diff --git a/compiler/testData/diagnostics/tests/callableReference/resolve/moreSpecificAmbiguousExtensions.kt b/compiler/testData/diagnostics/tests/callableReference/resolve/moreSpecificAmbiguousExtensions.kt new file mode 100644 index 00000000000..b24dc4d963b --- /dev/null +++ b/compiler/testData/diagnostics/tests/callableReference/resolve/moreSpecificAmbiguousExtensions.kt @@ -0,0 +1,21 @@ +// !CHECK_TYPE +// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE + +interface IA +interface IB : IA + +fun IA.extFun(x: IB) {} +fun IB.extFun(x: IA) {} + +fun test() { + val extFun1 = IA::extFun + val extFun2 = IB::extFun +} + +fun testWithExpectedType() { + val extFun_AB_A: IA.(IB) -> Unit = IA::extFun + val extFun_AA_B: IA.(IA) -> Unit = IB::extFun + val extFun_BB_A: IB.(IB) -> Unit = IA::extFun + val extFun_BA_B: IB.(IA) -> Unit = IB::extFun + val extFun_BB_B: IB.(IB) -> Unit = IB::extFun +} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/callableReference/resolve/moreSpecificAmbiguousExtensions.txt b/compiler/testData/diagnostics/tests/callableReference/resolve/moreSpecificAmbiguousExtensions.txt new file mode 100644 index 00000000000..2b902bca9c8 --- /dev/null +++ b/compiler/testData/diagnostics/tests/callableReference/resolve/moreSpecificAmbiguousExtensions.txt @@ -0,0 +1,18 @@ +package + +public fun test(): kotlin.Unit +public fun testWithExpectedType(): kotlin.Unit +public fun IA.extFun(/*0*/ x: IB): kotlin.Unit +public fun IB.extFun(/*0*/ x: IA): kotlin.Unit + +public interface IA { + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} + +public interface IB : IA { + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} diff --git a/compiler/testData/diagnostics/tests/callableReference/resolve/moreSpecificSimple.kt b/compiler/testData/diagnostics/tests/callableReference/resolve/moreSpecificSimple.kt new file mode 100644 index 00000000000..3c591688e56 --- /dev/null +++ b/compiler/testData/diagnostics/tests/callableReference/resolve/moreSpecificSimple.kt @@ -0,0 +1,12 @@ +// !CHECK_TYPE + +interface IA +interface IB : IA + +fun IA.extFun() {} +fun IB.extFun() {} + +fun test() { + val extFun = IB::extFun + checkSubtype Unit>(extFun) +} diff --git a/compiler/testData/diagnostics/tests/callableReference/resolve/moreSpecificSimple.txt b/compiler/testData/diagnostics/tests/callableReference/resolve/moreSpecificSimple.txt new file mode 100644 index 00000000000..f3855c167b4 --- /dev/null +++ b/compiler/testData/diagnostics/tests/callableReference/resolve/moreSpecificSimple.txt @@ -0,0 +1,17 @@ +package + +public fun test(): kotlin.Unit +public fun IA.extFun(): kotlin.Unit +public fun IB.extFun(): kotlin.Unit + +public interface IA { + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} + +public interface IB : IA { + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} diff --git a/compiler/testData/diagnostics/tests/callableReference/resolve/overloads.kt b/compiler/testData/diagnostics/tests/callableReference/resolve/overloads.kt index 008bd626354..18357e89d25 100644 --- a/compiler/testData/diagnostics/tests/callableReference/resolve/overloads.kt +++ b/compiler/testData/diagnostics/tests/callableReference/resolve/overloads.kt @@ -20,7 +20,7 @@ fun fas() {} fun fas(i: Int = 1) {} fun test() { - B::foo // todo KT-9601 Chose maximally specific function in callable reference + B::foo // todo KT-9601 Chose maximally specific function in callable reference B::bar checkType { _>() } diff --git a/compiler/testData/diagnostics/tests/callableReference/resolve/overloadsMember.kt b/compiler/testData/diagnostics/tests/callableReference/resolve/overloadsMember.kt index 6999d698730..3bb136804eb 100644 --- a/compiler/testData/diagnostics/tests/callableReference/resolve/overloadsMember.kt +++ b/compiler/testData/diagnostics/tests/callableReference/resolve/overloadsMember.kt @@ -11,6 +11,6 @@ class B: A() { } fun test() { - B::foo - B::fas + B::foo + B::fas } \ No newline at end of file diff --git a/compiler/testData/diagnostics/testsWithStdLib/resolve/kt10103.kt b/compiler/testData/diagnostics/testsWithStdLib/resolve/kt10103.kt new file mode 100644 index 00000000000..986bf3b6bae --- /dev/null +++ b/compiler/testData/diagnostics/testsWithStdLib/resolve/kt10103.kt @@ -0,0 +1 @@ +val stringReversed = String::reversed \ No newline at end of file diff --git a/compiler/testData/diagnostics/testsWithStdLib/resolve/kt10103.txt b/compiler/testData/diagnostics/testsWithStdLib/resolve/kt10103.txt new file mode 100644 index 00000000000..13fd7fd15bf --- /dev/null +++ b/compiler/testData/diagnostics/testsWithStdLib/resolve/kt10103.txt @@ -0,0 +1,3 @@ +package + +public val stringReversed: kotlin.reflect.KFunction1 diff --git a/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestGenerated.java index 29356ecac0f..fc612a514d8 100644 --- a/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestGenerated.java @@ -2015,6 +2015,12 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/callableReference/resolve"), Pattern.compile("^(.+)\\.kt$"), true); } + @TestMetadata("ambiguousWithVararg.kt") + public void testAmbiguousWithVararg() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/resolve/ambiguousWithVararg.kt"); + doTest(fileName); + } + @TestMetadata("byArgType.kt") public void testByArgType() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/resolve/byArgType.kt"); @@ -2039,6 +2045,24 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { doTest(fileName); } + @TestMetadata("kt9601.kt") + public void testKt9601() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/resolve/kt9601.kt"); + doTest(fileName); + } + + @TestMetadata("moreSpecificAmbiguousExtensions.kt") + public void testMoreSpecificAmbiguousExtensions() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/resolve/moreSpecificAmbiguousExtensions.kt"); + doTest(fileName); + } + + @TestMetadata("moreSpecificSimple.kt") + public void testMoreSpecificSimple() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/resolve/moreSpecificSimple.kt"); + doTest(fileName); + } + @TestMetadata("overloads.kt") public void testOverloads() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/resolve/overloads.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestWithStdLibGenerated.java b/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestWithStdLibGenerated.java index 59c7c0a7016..fb4a1205d87 100644 --- a/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestWithStdLibGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestWithStdLibGenerated.java @@ -994,6 +994,12 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW doTest(fileName); } + @TestMetadata("kt10103.kt") + public void testKt10103() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/resolve/kt10103.kt"); + doTest(fileName); + } + @TestMetadata("kt4711.kt") public void testKt4711() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/resolve/kt4711.kt");