JS: report error when js() produces empty AST
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
fun test() {
|
||||
js(<!JSCODE_NO_JAVASCRIPT_PRODUCED!>""<!>)
|
||||
js(<!JSCODE_NO_JAVASCRIPT_PRODUCED!>" "<!>)
|
||||
js(<!JSCODE_NO_JAVASCRIPT_PRODUCED!>"""
|
||||
"""<!>)
|
||||
|
||||
val empty = ""
|
||||
js(<!JSCODE_NO_JAVASCRIPT_PRODUCED!>empty<!>)
|
||||
|
||||
val whitespace = " "
|
||||
js(<!JSCODE_NO_JAVASCRIPT_PRODUCED!>whitespace<!>)
|
||||
|
||||
val multiline = """
|
||||
"""
|
||||
js(<!JSCODE_NO_JAVASCRIPT_PRODUCED!>multiline<!>)
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
package
|
||||
|
||||
internal fun test(): kotlin.Unit
|
||||
+6
@@ -257,6 +257,12 @@ public class JetDiagnosticsTestWithJsStdLibGenerated extends AbstractJetDiagnost
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("noJavaScriptProduced.kt")
|
||||
public void testNoJavaScriptProduced() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/jsCode/noJavaScriptProduced.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("warning.kt")
|
||||
public void testWarning() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/jsCode/warning.kt");
|
||||
|
||||
Reference in New Issue
Block a user