Pavel Kunyavskiy
62fb3df7f0
[K/N] Disable scope initialization on constant access
...
^KT-57098
2023-03-15 09:03:19 +00:00
Ivan Kylchik
0af4ef8ee9
Fix typo in test name: inlinInDefault -> inlineInDefault
2023-03-14 20:47:43 +00:00
Ivan Kylchik
bb401c39d9
Add several new SMAP tests
...
Some of them are still failing and suppose to be
fixed later
2023-03-14 20:47:39 +00:00
Pavel Kunyavskiy
dc2e072af2
[K/N] Make exception handling in initializers more consistent with jvm
...
^KT-57091
2023-03-14 12:59:14 +00:00
Svyatoslav Kuzmich
1603cd11ea
[Wasm] Use jsshell version in zip and directory names
...
Otherwise, it wouldn't rerun the task when downloading new version
2023-03-10 14:03:26 +00:00
Vladimir Sukharev
65276e5960
[Testsystem] Insert missing opt-in
...
Merge-request: KT-MR-9158
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com >
2023-03-10 13:17:37 +00:00
Kirill Rakhman
0e721c8fc2
[FIR2IR] Fix generation of val initialization after smart-cast
...
If neither setter nor backing field were found for an assignment call,
search overridden properties for backing fields.
^KT-57105 Fixed
2023-03-10 09:30:51 +00:00
Kirill Rakhman
c4255cdb0f
[FIR2IR] Fix adapted callable reference to nested class constructor
...
^KT-56829 Fixed
2023-03-08 08:36:52 +00:00
Igor Chevdar
315d9089b0
[box-tests] Another version of reproducer for KT-56965
2023-03-08 06:48:52 +00:00
Igor Chevdar
99ec3215d9
[box-tests] Added a reproducer for KT-57053
2023-03-08 06:48:51 +00:00
Evgeniy.Zhelenskiy
88f293d4a9
[IR] Support reflection for MFVC
...
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com >
#KT-1179
2023-03-07 21:44:43 +00:00
Zalim Bashorov
4d7cf81ed0
[Wasm] Stop supporting "_export.js" in test infra, use import/export capability in relevant tests
...
* It works slightly differently in SpiderMonkey.
* It was a hack.
2023-03-06 23:19:02 +01:00
Zalim Bashorov
bec827b654
[Wasm] Update SpiderMonkey to 112.0a1 (2023-03-04-09-52-24)
2023-03-06 23:19:02 +01:00
vladislav.grechko
7033d78641
Fix SAM conversion generation condition
...
Remove check if array is passed to vararg parameter as it's not
relevant anymore and leads to ^KT-51821.
^KT-51821: Fixed
2023-03-04 12:53:48 +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
60ef7fcb49
[Wasm] Suppress unused parameters warning for functions with JS body
...
These parameters can be used in js(code)
2023-03-03 19:39:09 +00:00
Svyatoslav Kuzmich
71e6b19760
[Wasm] Support restricted version of js("code") (KT-56955)
2023-03-03 19:39:09 +00:00
Kirill Rakhman
1f0e6321b0
[FIR2IR] Use companion as bound receiver if expected type requires it
...
A::foo is preferably resolved as an unbound reference to A.foo, however
if A.Companion is a subtype of A and the expected type has one fewer
parameter than the type of the unbound reference, generate a bound
reference with the companion as receiver.
^KT-56519 Fixed
2023-03-02 10:55:46 +00:00
Kirill Rakhman
3b9724d20e
[FIR] Desugar increment/decrement in body resolve phase
...
The expression needs to be resolved first to determine if there is a
receiver that needs to be extracted to a temporary variable. Also, the
special case for prefix increment/decrement on local variable without
delegates requires resolution to check if the variable is local.
^KT-56771 Fixed
^KT-56659 Fixed
2023-03-02 10:19:57 +00:00
Kirill Rakhman
d00513599b
[FIR2IR] Expand typealias in callable reference receiver generation
...
^KT-56750 Fixed
2023-03-02 08:20:04 +00:00
Ivan Kochurkin
ee53c5780f
[FIR] Extract K2 MPP test data to the separated directory
2023-03-01 22:10:11 +00:00
Igor Chevdar
c038bbde08
[box-tests] Added a reproducer for KT-56965
2023-03-01 08:09:51 +00:00
Nikolay Lunyak
be5850112a
[FIR] KT-56723: Ensure safe access over non-expressions is always Unit
...
^KT-56723 Fixed
2023-02-27 15:00:30 +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
Svyatoslav Kuzmich
54a45c49f8
[Wasm] Add Wasm platform and K1 FE infrastructure
2023-02-24 01:05:23 +01:00
Ilmir Usmanov
b3890885c4
JVM: Break infinite loop in finding meaningful instruction
...
during tail-call optimization.
There can be code, where all next instructions are non-meaningful and
there is a back-edge, for example, while(true){}. Previously, analyzer
incorrectly assumed, that this cannot happen. Now, it keeps track of
visited instructions and says, that there is no meaningful instruction
in such case.
#KT-56815 Fixed
2023-02-23 17:54:46 +00:00
Igor Chevdar
5d3b61364a
Added a test for KT-56500
2023-02-23 15:32:25 +00:00
Alexander Udalov
4ad594a3cd
Minor, move tests about Java field and Kotlin property
...
Because the `fieldRename` directory was originally about cases when
private fields are renamed because of clashes.
2023-02-23 12:54:00 +01:00
Denis.Zharkov
0c9fad87c3
K2: Fix deserialization of upper bound of type parameter in nested class
...
Previously, containingDeclarationSymbol for V was set to the outer class
BaseRoot, so its upper bounds was computed to the ones from TNested
at org.jetbrains.kotlin.fir.resolve.calls.CreateFreshTypeVariableSubstitutorStageKt.getTypeParameterFromExpandedClass
^KT-56706 Fixed
2023-02-21 12:35:34 +00:00
Ivan Kylchik
477d092bb8
Avoid object's interpretation with nullable type
...
#KT-56215 Fixed
2023-02-20 15:52:52 +00:00
Ilmir Usmanov
e42efe1ee6
JVM IR: Ignore class type parameters if function is static
...
Otherwise, it leads to type parameters duplication in case of
suspendImpls, since they inherit type parameters from containing class.
#KT-56407: Fixed
2023-02-07 13:39:25 +00:00
Vladimir Sukharev
e75d739c7a
Add tests for property const initializers
...
Merge-request: KT-MR-8661
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com >
2023-02-06 15:43:41 +00:00
Denis.Zharkov
6d7096b5e9
IR: Fix StackOverflowError caused by using DNN type in lambda
...
^KT-54140 Fixed
2023-02-03 14:08:57 +00:00
Svyatoslav Kuzmich
bebb9b1392
[Wasm] Move compiler tests to :wasm:wasm.tests module
...
They don't belong in K/JS test module.
2023-01-31 13:12:12 +00:00
Zalim Bashorov
885381dd63
[Wasm] Change externRefToAny to make it compatible with SpiderMonkey and V8
...
It's hard to achieve that without implementing part of `externRefToAny` using an intrinsic. It should be rewritten when all VMs and tools update to the latest spec.
Also, stop using (deprecated) instructions unsupported by SpiderMonkey.
#KT-56166 In-Progress
2023-01-27 17:57:50 +01:00
Zalim Bashorov
1d793f7bec
[Wasm] Revert a7ed496a and few fixes to make Kotlin/Wasm compatible with Firefox
...
Revert changes as soon as the bug is fixed https://bugzilla.mozilla.org/show_bug.cgi?id=1811932
a7ed496a "[WASM] Use wasm bottom types for Nothing?"
#KT-56166 In-Progress
2023-01-27 17:57:49 +01:00
Zalim Bashorov
2573201a87
[Wasm] provide "location" for pseudo-instructions using to add comments
2023-01-17 19:37:06 +01:00
Zalim Bashorov
ab1cbc49dd
[Wasm] Minor: move buildUnreachable* helpers to more specific module
2023-01-17 19:37:05 +01:00
Zalim Bashorov
9e4b2b78e6
[Wasm] Remove unnecessary location from WasmDataMode constructor
2023-01-17 19:37:05 +01:00
Zalim Bashorov
2fa2725012
[Wasm] Add a comment about location into WasmExpressionBuilder
2023-01-17 19:37:05 +01:00
Zalim Bashorov
aa8a0fd7d7
[Wasm] Remove LocationHolder and helper functions
...
It turned out that dedicated scoping function for locations are not so useful.
Now, if you want to scope a location use functions from stdlib, like `let`.
2023-01-17 19:37:05 +01:00
Zalim Bashorov
e62add937b
[Wasm] Remove SourceLocation.TBDLocation and related things
2023-01-17 19:37:05 +01:00
Zalim Bashorov
0d203d190e
[Wasm] Remove buildInstr without location and fix usages
2023-01-17 19:37:05 +01:00
Zalim Bashorov
42f2edd282
[Wasm] Require location for buildThrow and fix all usages
2023-01-17 19:37:05 +01:00