JS: prohibit stable (public) names with non-identifier chars. Rewrite unstable (private) names with non-identifier chars. See KT-4160

This commit is contained in:
Alexey Andreev
2016-12-28 13:49:03 +03:00
parent 7f0166623d
commit 900adcf29b
14 changed files with 166 additions and 10 deletions
@@ -440,6 +440,12 @@ public class DiagnosticsTestWithJsStdLibGenerated extends AbstractDiagnosticsTes
doTest(fileName);
}
@TestMetadata("illegalName.kt")
public void testIllegalName() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/name/illegalName.kt");
doTest(fileName);
}
@TestMetadata("jsNameAndNamedNative.kt")
public void testJsNameAndNamedNative() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/name/jsNameAndNamedNative.kt");