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
Ilya Goncharov
507516e44d
[JS IR] Add tests with reified generic and with KType on DCE to leave class
2021-05-17 16:51:20 +03:00
Ilya Goncharov
f0b3ee0e35
[JS IR] Add test with class reference using from js
2021-05-17 16:51:19 +03:00
Dmitriy Novozhilov
d114913cd2
Replace usages of addToStdlib.firstNotNullResult with firstNotNullOfOrNull
2021-05-14 14:30:19 +03:00
Abduqodiri Qurbonzoda
46338224e1
Remove deprecated JQuery
2021-04-08 18:43:16 +03:00
Abduqodiri Qurbonzoda
40d1849f33
Migrate compiler, idea and others to new case conversion api
2021-04-08 03:22:02 +03:00
Ilya Gorbunov
e450a6494a
Migrate deprecations in core, compiler, idea, tests
...
Replacing deprecated Char.toInt() with Char.code and
Number.toChar() with Number.toInt().toChar(), where Number is not Int.
KT-23451
2021-04-07 18:30:20 +03:00
Abduqodiri Qurbonzoda
b0f1ddc91e
Advance max/min(By/With) deprecation level to ERROR
2021-04-07 07:49:23 +03:00
Abduqodiri Qurbonzoda
968099fbec
Advance deprecation level of FP to lesser than Int types to ERROR #KT-30360
2021-04-07 00:23:20 +03:00
Ilya Gorbunov
94240f7b21
Stabilize unsigned types KT-45653
...
Deprecate specialized unsigned iterators for removal.
Fix compiler tests:
- drop unsignedLiteralsOn1_2 because apiVersion 1.2 is no longer supported
- drop experimental unsigned literals diagnostic test
2021-03-31 19:05:04 +03:00
Ilya Goncharov
30a024d05d
[JS IR] Add test with member with JsName and default argument
...
^KT-44796 fixed
2021-03-29 19:58:15 +03:00
Svyatoslav Kuzmich
6bd34db725
[JS IR] Fix kotlin.js.js with complex constant expressions
...
Use IR interpreter to evaluate complex constexprs
2021-03-17 15:12:18 +03:00
Ilya Goncharov
ead0b50107
[JS IR] In file:JsModule top level with fresh names
2021-03-12 12:57:56 +03:00
Ilmir Usmanov
d67e4f0c48
Rename inline class -> @JvmInline value class in stdlib and compiler
2021-02-25 16:06:51 +01:00
Ilya Goncharov
d9be59ea97
[JS IR] JS code in init block only for js ir backend test
2021-02-20 21:06:28 +03:00
Ilya Goncharov
187d4998fa
[JS IR] Not cast to declaration parent in JsCodeOutlineLowering, use parent otherwise
...
^KT-45057 fixed
2021-02-20 13:08:45 +03:00
Anton Bannykh
6c6d43c29a
JS: add missing reachable nodes data
2021-02-12 16:21:09 +03:00
Ilya Goncharov
19bffc694b
[JS IR] Add test with chain export--not-export--export
...
^KT-44616 fixed
2021-02-08 13:41:16 +03:00
Ilya Goncharov
7b4624aac4
[JS IR] Add exported method into exportNestedClass.kt
...
^KT-44616 fixed
2021-02-08 13:38:47 +03:00
Ilya Goncharov
6c051b2be4
[JS IR] Override method are not exported
...
[JS IR] Add test with jsexport overrides not js export method with stable name
^KT-44616 fixed
2021-02-08 13:38:30 +03:00
Svyatoslav Kuzmich
c9cb7bc0fd
[JS IR] Update tests
2021-02-04 16:16:41 +03:00
Victor Turansky
ba0d60853d
KT-40235 null companion for stdlib external union types
2021-02-03 20:36:24 +03:00
Ilya Gorbunov
87e130e77a
Remove obsolete diagnostics suppression
...
The diagnostic NON_PUBLIC_PRIMARY_CONSTRUCTOR_OF_INLINE_CLASS is now
obsolete because internal constructors of inline classes became allowed.
2021-02-03 18:23:53 +03:00
Ilya Goncharov
977781fa49
[JS IR] Add tests with export all file and export nested class
...
[JS IR] Skip dce driven for nested classes export
^KT-44469 fixed
2021-01-28 18:55:33 +03:00
Svyatoslav Kuzmich
cb3b1f8ae2
[JS IR] Fix referencing Kotin variables in inline JS code
...
Fixed by outlining JS code that uses Kotlin variables making usages of
these locals explicit and preventing bugs due to one-sided variable renaming.
This prevents using Kotlin variables as lvalue in JS code.
2021-01-25 19:18:44 +03:00
Ilya Goncharov
a89fe90043
[JS IR] Add test on exportable overriden method
...
^KT-44415 fixed
2021-01-25 15:16:22 +03:00
Pavel Kirpichenkov
5c28762c02
Fix check for local classes in approximating string table
...
Take local/anonymous classes and their inner classes into account.
Simplify approximation: use first available super classifier instead
of first super class. This approximation should only happen for
private declarations that were not previously approximated by frontend.
So basically the only requirement for the approximated types is to be
denotable. Note that this only works if the types are not used later.
JVM uses a different string table implementatin as it needs exact
types of private members for reflection.
^KT-20996 Fixed
2021-01-20 11:05:53 +03:00
Zalim Bashorov
47c4197098
[JS old] Revert fix made for KT-44221 in ab753625
...
And mute the test for old BE.
#KT-44221 Open
2021-01-13 01:22:17 +03:00
Svyatoslav Kuzmich
ab753625fe
[JS Legacy] Fix returning Char from suspend functions (KT-44221)
...
Mark translated expression with a proper type, like we do with
non-suspending calls, to coerce it later.
2021-01-12 15:42:31 +03:00