Artem Kobzar
102072a229
fix(KT-40236): compute JsName from overridden symbols.
2021-10-29 14:09:31 +00:00
Artem Kobzar
7f7aa9a921
feat(Inner Classes): generate typescript type definitions and JS for Inner Classes.
2021-10-28 17:33:41 +00:00
Ivan Kylchik
8a1362de03
[JS TESTS] Rewrite web demo tests using new test infrastructure
2021-10-25 00:14:21 +03:00
Ivan Kylchik
a2d2ace71a
[JS TESTS] Rewrite js tests using new test infrastructure
2021-10-25 00:14:20 +03:00
Ivan Kylchik
4deab9693e
[JS TESTS] Remove LANGUAGE_VERSION directive
...
Some of them are not necessary at all, others can be replaced with
`!LANGUAGE` directive with exclusion of corresponding features.
2021-10-25 00:14:20 +03:00
Ivan Kylchik
9c3e93024b
[JS TESTS] Explicitly specify module name for typescript-export tests
2021-10-25 00:14:19 +03:00
Ivan Kylchik
3e1563d46e
[JS TESTS] Rename JS_TESTS module to main
2021-10-25 00:14:19 +03:00
Ivan Kylchik
32e6d3908d
[JS TESTS] Move MODULE_KIND directive to module level
2021-10-25 00:14:19 +03:00
Ivan Kylchik
aaab22a675
[JS TESTS] Move dependency modules higher than main in test files
2021-10-25 00:14:19 +03:00
Ivan Kylchik
2bea77d4e2
[JS TESTS] Replace - symbol in module name with _
2021-10-25 00:14:19 +03:00
Ilya Goncharov
f6ba2a958a
[JS IR] No generate exportness for overridden properties
...
[JS IR] Add check on existence of overridden property in tests
^KT-49326 fixed
[JS IR] Add details to comment with exporting properties
^KT-49326 fixed
[JS IR] No generate exportness for overridden properties,
if only no override val -> var
^KT-49326 fixed
Merge-request: KT-MR-4810
2021-10-21 10:52:48 +00:00
Artem Kobzar
876d358fe6
fix(KT-46961): add support of nested external enums.
2021-10-21 06:40:00 +00:00
Artem Kobzar
3dbf996ec6
fix(KT-49225): remove unnecessery boxing.
2021-10-21 06:38:42 +00:00
Anton Bannykh
c2f7ed2fff
[JS IR] added a directive to skip IC checks in IR
2021-10-15 20:14:53 +03:00
Sergej Jaskiewicz
8b2410733f
[JS IR] Improve the test for exporting protected members
2021-10-15 12:52:11 +00:00
Svyatoslav Kuzmich
0f66f85cf9
[Wasm] Support main function
2021-10-15 13:58:55 +03:00
Igor Laevsky
dcdc7e4633
[Wasm] Add box tests for kotlin.test
2021-10-14 17:24:03 +03:00
Sergej Jaskiewicz
55ae6d1f3e
[JS IR] Optimize pattern-matching of enums into comparing their ordinals
...
For this code:
```
enum class Season {
WINTER,
SPRING,
SUMMER,
AUTUMN
}
fun bar1(x : Season) : String {
return when (x) {
Season.WINTER, Season.SPRING -> "winter_spring"
Season.SUMMER -> "summer"
else -> "autumn"
}
}
```
previously we generated this:
```
function foo(x) {
var tmp0_subject = x;
return (tmp0_subject.equals(Season_WINTER_getInstance())
? true
: tmp0_subject.equals(Season_SPRING_getInstance()))
? 'winter_spring'
: tmp0_subject.equals(Season_SUMMER_getInstance())
? 'summer'
: 'autumn';
}
```
And now we generated this:
```
function bar2(x) {
var tmp0_subject = x;
var tmp0 = tmp0_subject._get_ordinal__0_k$();
var tmp;
switch (tmp0) {
case 0:
case 1:
tmp = 'winter_spring';
break;
case 2:
tmp = 'summer';
break;
case 3:
tmp = 'autumn';
break;
default:
noWhenBranchMatchedException();
break;
}
return tmp;
}
```
2021-10-14 11:44:01 +00:00
Artem Kobzar
f645c89ebf
fix(KT-43191): add static qualifier for Companion and non-inner objects.
2021-10-13 11:09:59 +00:00
Svyatoslav Kuzmich
90dd0c6150
[JS] Fix and mute failed tests on TC
2021-10-13 01:26:27 +03:00
Svyatoslav Kuzmich
279f184703
[JS] Remove failed checks based on unstable naming
2021-10-12 23:29:39 +03:00
Svyatoslav Kuzmich
3f8dce4b53
[JS IR] Support per-file mode and ES modules
2021-10-12 23:29:39 +03:00
Svyatoslav Kuzmich
f479ac5c3a
Remove implementation specific access to _ from test
...
Operator `new` is already tested with String class
2021-10-12 23:01:01 +03:00
Ilya Goncharov
669965d56c
[JS IR] Generate main method call only for main module
2021-10-08 10:08:57 +00:00
Roman Artemev
7eb0fd4762
[JS IR] Unmute fixed tests
2021-10-07 16:00:50 +03:00
Sergej Jaskiewicz
65d40c2253
[JS IR] Make tests that use directives pass with IR BE
2021-10-06 09:23:50 +00:00
Roman Artemev
23cba59b90
[JS IR] Unmute fixed test
2021-10-01 23:02:22 +03:00
Ilya Goncharov
23c8433fce
[JS IR] Eager initialization of adapter for kotlin.test tests
2021-10-01 13:32:13 +00:00
Sergej Jaskiewicz
f0f60907e2
[JS IR] Fix generating property accessors
...
TL;DR, before we were emitting this JS code:
Object.defineProperty(Base.prototype, 'bar', {
configurable: true,
get: Base.prototype._get_bar__0_k$,
set: Base.prototype._set_bar__a4enbm_k$
});
Now we emit this code instead:
Object.defineProperty(Base.prototype, 'bar', {
configurable: true,
get: function () {
return this._get_bar__0_k$();
},
set: function (value) {
this._set_bar__a4enbm_k$(value);
}
});
This fixes the issue where if we had a @JsExport'ed base class with a
public property overridden in a non-exported derived class, we couldn't
access that property from JS if we were given an instance of
the derived class.
#KT-41912 Fixed
2021-09-28 20:04:38 +03:00
Roman Artemev
18950feeff
[JS IR] Add tests for KT-48941
2021-09-28 18:15:48 +03:00
Sergej Jaskiewicz
b3c681ee42
[JS IR] Tests for TS declarations of sealed classes
...
Also make sure we generate proper declarations for abstract and data
classes.
#KT-39364 Fixed
#KT-47376 Fixed
2021-09-28 13:54:48 +03:00
Roman Artemev
9123d426c3
[JS] Add test for KT-43374
2021-09-27 19:01:42 +03:00
Victor Petukhov
a264cbfe7d
Move CallUtil.kt under the resolve.util package
2021-09-27 16:12:01 +03:00
Victor Petukhov
1635bcad10
Move CallResolverUtil.kt under the resolve.util package
2021-09-27 16:12:00 +03:00
Roman Artemev
6efba76a06
[JS] Add test for KT-47811
2021-09-27 15:13:03 +03:00
Vyacheslav Gerasimov
ab146bd6d4
Build: Fix deprecated Gradle configurations usages
...
for migration to Gradle 7+ #KTI-559
2021-09-26 18:28:44 +03:00
Roman Artemev
3b53c97c2c
[JS IR] Fix test data 'kt -> ir -> klib -> ir -> js' aka prod mode
...
- fix order in dts tests
- unmute fixed test in prod mode
- mute filing expect-actual link test in prod mode
2021-09-13 13:44:46 +03:00
Sergej Jaskiewicz
2f07589b42
[JS IR] Avoid name clashes for @JsQualifier-annotated declarations
...
#KT-42039 Fixed
2021-09-10 15:48:43 +03:00
Sergej Jaskiewicz
cb3d5f90e6
[JS IR] Export protected members too
...
#KT-47524 Fixed
#KT-47525 Fixed
2021-09-06 12:46:25 +00:00
Sergej Jaskiewicz
be999564b1
[JS IR] Export nested objects
...
Companion objects are exported as ParentClass.Companion.
Companion object's members are not exposed to its parent class —
one must reference the companion object explicitly if they want to
access its members.
#KT-43783 Fixed
2021-09-02 14:40:15 +03:00
Ilmir Usmanov
486c6b3c15
Remove obsolete experimental coroutines support
...
in compiler.
2021-08-13 22:31:30 +02:00
Mikhael Bogdanov
5f3f2e762a
Update JS tests
2021-07-29 19:45:54 +02:00
Mikhael Bogdanov
38fb5e16ef
Update test affected by ApproximateIntegerLiteralTypesInReceiverPosition feature
2021-07-29 19:45:54 +02:00
Ilya Goncharov
b03af384af
[JS IR] Add test with exception diagnostic of boolean in externals
2021-06-29 10:12:56 +00:00
Ilya Goncharov
21a3494bca
[JS IR] Add test with boolean in external interface
...
[JS IR] Add possibility to safely access Boolean in external declaration
[JS IR] Add diagnostic for booleans in externals
2021-06-29 10:12:54 +00:00
Zalim Bashorov
a908e5576d
[JS] Extract sourcemap generating related files to a separate module
...
It's required to reuse the same infrastructure in the new backend.
2021-06-28 16:04:09 +03:00
Ilya Goncharov
eed23ddbe3
[JS, Frontend] Add test with extension member in external interface
2021-06-18 17:20:57 +03:00
Alexander Udalov
81ce1da352
Move PsiSourceElement to psi
2021-06-01 20:28:23 +02:00
Anton Bannykh
0182c09318
[JS IR] fix name clashes for imported external declarations
2021-05-20 16:37:38 +03:00
Ilya Goncharov
74d1812461
[JS IR] Review remarks
...
- Move origin to common place
- Add comments and todo about solution
- Remove MODULE directive from tests
- Add test with in-place using of js function
2021-05-17 16:51:22 +03:00