[Wasm] Add @WasmImport diagnostics (KT-56943)

WasmImport annotated functions:
* Restricted to top-level external functions
* Only supports primitive numbers, booleans and Unit
  (as return type only) in its signature
* Can't have default parameter values
* Can't have vararg parameters
This commit is contained in:
Svyatoslav Kuzmich
2023-02-17 16:58:53 +01:00
committed by Space Team
parent f79607d32d
commit 1da96213ca
6 changed files with 157 additions and 0 deletions
@@ -57,4 +57,20 @@ public class DiagnosticsWasmTestGenerated extends AbstractDiagnosticsWasmTest {
runTest("compiler/testData/diagnostics/wasmTests/jsInterop/jsExport.kt");
}
}
@Nested
@TestMetadata("compiler/testData/diagnostics/wasmTests/wasmInterop")
@TestDataPath("$PROJECT_ROOT")
public class WasmInterop {
@Test
public void testAllFilesPresentInWasmInterop() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/wasmTests/wasmInterop"), Pattern.compile("^(.+)\\.kt$"), null, true);
}
@Test
@TestMetadata("wasmImport.kt")
public void testWasmImport() throws Exception {
runTest("compiler/testData/diagnostics/wasmTests/wasmInterop/wasmImport.kt");
}
}
}