Add test for checking ambiguity for root package and the same package
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
// FILE: checkAmbiguityBetweenRootAndPackage.kt
|
||||
package test
|
||||
|
||||
val t = <!OVERLOAD_RESOLUTION_AMBIGUITY!>testFun()<!>
|
||||
|
||||
// FILE: checkAmbiguityBetweenRootAndPackageRoot.kt
|
||||
fun testFun() = 12
|
||||
|
||||
// FILE: checkAmbiguityBetweenRootAndPackageTest.kt
|
||||
package test
|
||||
|
||||
fun testFun() = 12
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace <root>
|
||||
|
||||
// <namespace name="test">
|
||||
namespace test
|
||||
|
||||
internal final val t: [ERROR : Type for testFun()]
|
||||
internal final fun testFun(): jet.Int
|
||||
// </namespace name="test">
|
||||
internal final fun testFun(): jet.Int
|
||||
@@ -3810,6 +3810,11 @@ public class JetDiagnosticsTestGenerated extends AbstractDiagnosticsTestWithEage
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/diagnostics/tests/scopes"), "kt", true);
|
||||
}
|
||||
|
||||
@TestMetadata("AmbiguityBetweenRootAndPackage.kt")
|
||||
public void testAmbiguityBetweenRootAndPackage() throws Exception {
|
||||
doTest("compiler/testData/diagnostics/tests/scopes/AmbiguityBetweenRootAndPackage.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ImportFromCurrentWithDifferentName.kt")
|
||||
public void testImportFromCurrentWithDifferentName() throws Exception {
|
||||
doTest("compiler/testData/diagnostics/tests/scopes/ImportFromCurrentWithDifferentName.kt");
|
||||
|
||||
Reference in New Issue
Block a user