Test that clashing signatures are not reported when conflicting overloads are present in CLI

This commit is contained in:
Andrey Breslav
2014-06-04 17:10:53 +04:00
parent f79ddbd523
commit b4d154bb26
5 changed files with 19 additions and 0 deletions
@@ -0,0 +1,4 @@
-src
$TESTDATA_DIR$/conflictingOverloads.kt
-output
$TEMP_DIR$
@@ -0,0 +1,2 @@
fun a(): List<Int> = null!!
fun a(): List<String> = null!!
@@ -0,0 +1,3 @@
ERROR: $TESTDATA_DIR$/conflictingOverloads.kt: (1, 1) 'internal fun a(): kotlin.List<kotlin.Int>' is already defined in root package
ERROR: $TESTDATA_DIR$/conflictingOverloads.kt: (2, 1) 'internal fun a(): kotlin.List<kotlin.String>' is already defined in root package
COMPILATION_ERROR
@@ -44,6 +44,11 @@ public class KotlincExecutableTestGenerated extends AbstractKotlincExecutableTes
doJvmTest("compiler/testData/cli/jvm/classpath.args");
}
@TestMetadata("conflictingOverloads.args")
public void testConflictingOverloads() throws Exception {
doJvmTest("compiler/testData/cli/jvm/conflictingOverloads.args");
}
@TestMetadata("diagnosticsOrder.args")
public void testDiagnosticsOrder() throws Exception {
doJvmTest("compiler/testData/cli/jvm/diagnosticsOrder.args");
@@ -61,4 +61,9 @@ public class K2JvmCliTest extends CliBaseTest {
public void signatureClash() throws Exception {
executeCompilerCompareOutputJVM();
}
@Test
public void conflictingOverloads() throws Exception {
executeCompilerCompareOutputJVM();
}
}