JS: fix exception in JS front-end when checking JsName that was resolved with errors
This commit is contained in:
+7
@@ -0,0 +1,7 @@
|
||||
// !DIAGNOSTICS: -NO_VALUE_FOR_PARAMETER, -CONSTANT_EXPECTED_TYPE_MISMATCH
|
||||
// This should not crash, see KT-14752
|
||||
package foo
|
||||
|
||||
@JsName fun foo(x: Int) = x
|
||||
|
||||
@JsName(23) fun bar(x: Int) = x
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
package
|
||||
|
||||
package foo {
|
||||
@kotlin.js.JsName(name = 23) public fun bar(/*0*/ x: kotlin.Int): kotlin.Int
|
||||
@kotlin.js.JsName public fun foo(/*0*/ x: kotlin.Int): kotlin.Int
|
||||
}
|
||||
@@ -386,6 +386,12 @@ public class DiagnosticsTestWithJsStdLibGenerated extends AbstractDiagnosticsTes
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("jsNameWithoutParameter.kt")
|
||||
public void testJsNameWithoutParameter() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/name/jsNameWithoutParameter.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("methodAndMethod.kt")
|
||||
public void testMethodAndMethod() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/name/methodAndMethod.kt");
|
||||
|
||||
Reference in New Issue
Block a user