Test that clashing signatures are not reported when conflicting overloads are present in CLI
This commit is contained in:
@@ -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");
|
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")
|
@TestMetadata("diagnosticsOrder.args")
|
||||||
public void testDiagnosticsOrder() throws Exception {
|
public void testDiagnosticsOrder() throws Exception {
|
||||||
doJvmTest("compiler/testData/cli/jvm/diagnosticsOrder.args");
|
doJvmTest("compiler/testData/cli/jvm/diagnosticsOrder.args");
|
||||||
|
|||||||
@@ -61,4 +61,9 @@ public class K2JvmCliTest extends CliBaseTest {
|
|||||||
public void signatureClash() throws Exception {
|
public void signatureClash() throws Exception {
|
||||||
executeCompilerCompareOutputJVM();
|
executeCompilerCompareOutputJVM();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void conflictingOverloads() throws Exception {
|
||||||
|
executeCompilerCompareOutputJVM();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user