[JS] add CLI test for KT-60531
This commit is contained in:
committed by
Space Team
parent
1e66f25546
commit
002cd011d4
@@ -0,0 +1,9 @@
|
||||
$TESTDATA_DIR$/compilationErrorK2.kt
|
||||
-language-version
|
||||
2.0
|
||||
-ir-output-dir
|
||||
$TEMP_DIR$
|
||||
-ir-output-name
|
||||
compilationErrorK2.kt
|
||||
-libraries
|
||||
libraries/stdlib/build/classes/kotlin/js/main
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
class Foo {
|
||||
private companion object Test {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class Bar {
|
||||
fun a() {
|
||||
Foo.Test
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
warning: language version 2.0 is experimental, there are no backwards compatibility guarantees for new language and library features
|
||||
compiler/testData/cli/js/compilationErrorK2.kt:9:13: error: cannot access 'companion object Test : Any': it is private in '/Foo'.
|
||||
Foo.Test
|
||||
^
|
||||
COMPILATION_ERROR
|
||||
@@ -1333,6 +1333,11 @@ public class CliTestGenerated extends AbstractCliTest {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/cli/js"), Pattern.compile("^(.+)\\.args$"), null, false);
|
||||
}
|
||||
|
||||
@TestMetadata("compilationErrorK2.args")
|
||||
public void testCompilationErrorK2() throws Exception {
|
||||
runTest("compiler/testData/cli/js/compilationErrorK2.args");
|
||||
}
|
||||
|
||||
@TestMetadata("createMetadata.args")
|
||||
public void testCreateMetadata() throws Exception {
|
||||
runTest("compiler/testData/cli/js/createMetadata.args");
|
||||
|
||||
Reference in New Issue
Block a user