Svyatoslav Kuzmich
1c230c8f27
[Wasm] Port WasmImport/WasmExport checker to K2 (KT-56849)
2023-11-14 12:24:10 +00:00
Svyatoslav Kuzmich
15d3bf5e25
[Wasm] Port JS interop type checker to K2 (KT-56849)
2023-10-31 12:34:32 +00:00
Svyatoslav Kuzmich
a8e5655ffe
[Wasm] K2 port of definedExternally diagnostic (KT-56849)
2023-10-26 12:40:17 +00:00
Svyatoslav Kuzmich
aeeb5d5c48
[Wasm] Disallow dynamic type in K2 (KT-56849)
2023-10-24 10:54:58 +00:00
Svyatoslav Kuzmich
2694326ef8
[Wasm] Add EXTERNAL_TYPE_EXTENDS_NON_EXTERNAL_TYPE K2 diagnostic
...
Prohibit extending non-external types with external types (same as K1)
Issue KT-56849
2023-10-23 17:31:04 +00:00
Svyatoslav Kuzmich
a10042f909
[Wasm] Add K2 checkers.wasm module (KT-56849)
...
Add first K2 checker ExternalInheritanceChecker to test the infra
2023-10-12 13:26:58 +00:00
Svyatoslav Kuzmich
0da9cf8159
[Wasm] Add K2 diagnostic tests (KT-56849)
2023-10-12 13:26:58 +00:00
Igor Yakovlev
78fa93d75c
[Wasm] Restrict WasmExport functions for primitive typed signature
2023-07-17 14:01:13 +00:00
Igor Yakovlev
b5eafb9eb7
[Wasm] WasmExport implementation
2023-07-07 20:45:51 +00:00
Svyatoslav Kuzmich
7ba8f7cce2
Revert "[Wasm] Deprecate @JsFun with warning"
...
Reason: Design of js(code) replacement is still in flux.
It would be better to delay deprecation until we converge
to proper solution.
This reverts commit 3566d918d2 .
2023-04-21 15:03:20 +00:00
Svyatoslav Kuzmich
3c0048bfd8
[Wasm] Add typealias diagnostic test cases
2023-03-16 09:12:08 +00:00
Svyatoslav Kuzmich
1e91fe155b
[Wasm] Restrict types allowed in JS interop
...
- Prohibit Any, Array and other unsupported non-external types in JS
interop context
- Add K1 diagnostic
- Update BE testdata
^KT-57136 Fixed
2023-03-16 09:12:07 +00:00
Svyatoslav Kuzmich
c9c0b9fd10
[Wasm] Add more jsCode diagnostic tests with String properties
2023-03-03 19:39:11 +00:00
Svyatoslav Kuzmich
3566d918d2
[Wasm] Deprecate @JsFun with warning
...
kotlin.js.js("code") should be used instead
2023-03-03 19:39:11 +00:00
Svyatoslav Kuzmich
7a04999e4a
[Wasm] Add K1 compiler diagnostics for js(code) calls (KT-56955)
...
This function is handled as intrinsics and supported in limited context
2023-03-03 19:39:10 +00:00
Svyatoslav Kuzmich
4be2f53b47
[Wasm] Add @JsFun diagnostics (KT-56944)
...
JsFun target should be top-level external function
2023-02-24 11:35:16 +00:00
Svyatoslav Kuzmich
1da96213ca
[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
2023-02-24 11:35:16 +00:00
Svyatoslav Kuzmich
f79607d32d
[Wasm] Add @JsExport diagnostics test
...
@JsExport is only allowed on top-level functions in K/Wasm
Restrictions for nested function are handled by reusing K/JS diagnostics
Restrictions for classes and properties are handled by specifying
annotation target in stdlib
2023-02-24 11:35:16 +00:00
Svyatoslav Kuzmich
b4fcfd6719
[Wasm] Add external declaration diagnostics (KT-56940)
...
Prohibit:
- external enum class
- external tailrec fun
- external suspend fun
- external lateinit var
Add tests for other external diagnostics inherited from K/JS
2023-02-24 11:35:15 +00:00
Svyatoslav Kuzmich
83ba1ac0f7
[Wasm] Diagnostic test: dynamic type is unsupported
...
Validates the fix for KT-56711
2023-02-24 11:35:15 +00:00
Svyatoslav Kuzmich
c9e71985da
[Wasm] Stop dumping declarations in diagnostic tests
...
These tests are meant to check diagnostics, but
having to update .txt dumps adds some friction to development process.
2023-02-24 11:35:14 +00:00
Svyatoslav Kuzmich
321a476898
[Wasm] Add external inheritance checker.
...
Prohibit non-external types to extend external types.
This type of inheritance is not supported in Wasm backend.
2023-02-24 01:05:23 +01:00