diff --git a/compiler/testData/diagnostics/tests/overload/kt1998.kt b/compiler/testData/diagnostics/tests/overload/kt1998.kt new file mode 100644 index 00000000000..5cb4ed25c1f --- /dev/null +++ b/compiler/testData/diagnostics/tests/overload/kt1998.kt @@ -0,0 +1,13 @@ +// KT-1998 Strange "Overload resolution ambiguity" + +object A { + val c : String = "test" + + fun f(b: B): String { + return b.c // Test no "Overload resolution ambiguity" is reported here + } +} + +class B + +val B.c : String = "test" \ No newline at end of file diff --git a/compiler/tests/org/jetbrains/jet/checkers/JetDiagnosticsTestGenerated.java b/compiler/tests/org/jetbrains/jet/checkers/JetDiagnosticsTestGenerated.java index 3842d6bb238..695e61aff51 100644 --- a/compiler/tests/org/jetbrains/jet/checkers/JetDiagnosticsTestGenerated.java +++ b/compiler/tests/org/jetbrains/jet/checkers/JetDiagnosticsTestGenerated.java @@ -3074,6 +3074,11 @@ public class JetDiagnosticsTestGenerated extends AbstractDiagnosticsTestWithEage doTest("compiler/testData/diagnostics/tests/overload/FunNoConflictInDifferentPackages.kt"); } + @TestMetadata("kt1998.kt") + public void testKt1998() throws Exception { + doTest("compiler/testData/diagnostics/tests/overload/kt1998.kt"); + } + @TestMetadata("OverloadFunRegularAndExt.kt") public void testOverloadFunRegularAndExt() throws Exception { doTest("compiler/testData/diagnostics/tests/overload/OverloadFunRegularAndExt.kt");