Dmitry Petrov
99d8f2eb0c
Support 'call' for primary value of an inline class
...
Getter of a primary value of an inline class belongs to the box class.
Its arguments should not be unboxed when the method is called.
However, its result might require boxing if it's an inline class value.
When we have an internal primary value, there's no getter method.
In fact, we can use box/unbox methods for inline class directly
(don't forget to box the result, it may be an inline class type value).
#KT-26748
2018-11-14 09:57:51 +03:00
Mikhail Zarechenskiy
79159947a5
Coerce last value of delegated expression for inline classes
...
Note that this commit doesn't fix case when some inline class over
`Any` is returned from a lambda, it'll be fixed further as part of the
#KT-27586
#KT-27737 Fixed
2018-11-12 14:21:24 +03:00
Mikhail Zarechenskiy
20ff74a726
Fix mapping for inline classes when JvmSuppressWildcards mode is using
...
#KT-28097 Fixed
2018-11-12 09:36:05 +03:00
Dmitry Petrov
6d0a403ead
KT-26765: Support 'call' for constructors with inline class parameters
2018-11-09 10:21:46 +03:00
Roman Artemev
b010d9eef8
Add Contract tests for JS
2018-11-08 17:35:06 +03:00
Dmitry Petrov
1523185734
KT-27948: Use proper KotlinType when comparing with literal 0
...
#KT-27948
2018-11-07 18:17:29 +03:00
Dmitry Petrov
e14f74bc18
KT-27948: Properly coerce values when generating areEqual call
...
#KT-27948
2018-11-07 18:17:29 +03:00
Dmitry Petrov
ac7cc0c08e
KT-27706: Dispatch receiver type for constructor accessor is Object
2018-11-07 18:17:29 +03:00
Dmitry Petrov
ea4afdaebe
KT-27705: Use proper types for captured outer class instance
...
Call typeMapper only if we have an inline class.
2018-11-07 18:17:29 +03:00
Mikhael Bogdanov
d2a205c72d
Update synthetic parameter processing logic according to ASM 7 changes
...
#KT-27774 Fixed
2018-11-07 15:42:57 +01:00
Anton Bannykh
829bdf6061
JS: fix noInline version of inline suspend fun (KT-27611 fixed)
2018-11-07 12:34:00 +03:00
Anton Bannykh
5dae00182d
JS: fix suspend lambda inlining
...
* Also avoid casts when setting inline metadata
2018-11-07 12:07:02 +03:00
Anton Bannykh
4c5201d30e
JS: fix module parameter linking
2018-11-07 12:06:09 +03:00
Roman Artemev
7f215d3f52
Update tests
2018-11-01 16:51:38 +03:00
Roman Artemev
59b1743c37
Add tests
2018-10-25 15:48:42 +03:00
Alexander Udalov
1ee1d15b91
Support annotations on property accessors in JS/common metadata
...
#KT-14529 Fixed
2018-10-24 18:17:12 +02:00
Alexander Udalov
9394caf9cf
Use access to backing field on overridden property with private setter
...
#KT-27772 Fixed
2018-10-24 12:53:50 +02:00
Mikhael Bogdanov
a4206a543a
Skip test on JDK 6
2018-10-22 16:32:55 +02:00
Mikhael Bogdanov
edc648813d
Regenerate box tests
2018-10-22 16:32:52 +02:00
Anton Bannykh
29ff4d6677
[JS IR BE]: Disable incremental compilation tests until IC is supported
2018-10-18 14:24:05 +03:00
Anton Bannykh
995ac7aac2
[JS IR BE]: make deleteProperty non-inline due to new inliner limitations
2018-10-18 14:24:05 +03:00
Zalim Bashorov
99a131d0ab
KJS test infrastructure: cache reference to global object and it's original state instead of evaluate them for each run
2018-10-17 18:29:41 +03:00
Zalim Bashorov
1ef3906481
Minor: reformat and cleanup NashornJsTestChecker.kt
2018-10-17 18:29:40 +03:00
Dmitry Petrov
b13d270d77
Test: reference to constructor with inline class parameters
2018-10-17 16:38:22 +03:00
Dmitry Petrov
0af2a0dc19
Tests: references to private/internal primary val of inline class
2018-10-17 16:38:22 +03:00
Dmitry Petrov
5032c106af
Support 'call' for references to inline class constructors
...
#KT-26748
2018-10-17 16:38:22 +03:00
Dmitry Petrov
94e1701089
Support 'call' for references to inline class members
...
This includes overriding and non-overriding functions and properties.
#KT-26748
2018-10-17 16:38:22 +03:00
Dmitry Petrov
3dc4d01adc
Tests for callable references and inline classes
2018-10-17 16:38:22 +03:00
romanart
71f109387a
Update tests
2018-10-17 14:10:37 +03:00
romanart
6a66663739
Update IR Runtime
2018-10-17 14:10:37 +03:00
Georgy Bronnikov
376eef05f5
JVM_IR. Accessor lowering
2018-10-15 21:52:50 +03:00
Pavel Punegov
ed64d42d45
Regenerate JS tests
2018-10-15 19:25:02 +03:00
Pavel Punegov
d9a8a00069
Make tests that use jvm-annotations be targeted to jvm backend
2018-10-15 19:25:02 +03:00
Dmitry Petrov
b6be72bb11
Add more tests for inline classes
...
#KT-27416
#KT-27513
2018-10-15 12:21:14 +03:00
Dmitry Petrov
0fd68d29f4
Support @JvmStatic in inline class companion object
...
#KT-27107
2018-10-15 12:21:14 +03:00
Dmitry Petrov
5304754e88
Generate specialized 'toString' for inline classes when possible
...
#KT-25613
2018-10-15 12:21:14 +03:00
Dmitry Petrov
f68ce4b35b
Support default parameter values for inline class constructors and funs
...
#KT-26908
#KT-26554
Move default parameter value tests to separate directory
2018-10-15 12:21:14 +03:00
Dmitry Petrov
8ce1d09f8a
Fix inline class coercion in default parameter values
...
#KT-27358
2018-10-15 12:21:14 +03:00
Svyatoslav Kuzmich
5a057f8ca6
[JS IR BE] Support 'is Number' and 'is Comparable<>'
2018-10-14 23:53:03 +03:00
Svyatoslav Kuzmich
bad9534abd
[JS IR BE] Support integer operation overflow
2018-10-14 23:53:02 +03:00
Zalim Bashorov
8013a56286
[JS IR BE] process empty loops correctly in BlockDecomposerLowering
2018-10-13 01:51:59 +03:00
Mikhail Zarechenskiy
b7d7d1eb01
Fix inline class type coercion in == with generic call
...
#KT-27393 Fixed
2018-10-12 12:50:49 +03:00
Mikhail Zarechenskiy
0201694f84
Propagate KotlinType into create method for coroutines
...
#KT-27526 Fixed
2018-10-12 12:50:47 +03:00
Mikhail Zarechenskiy
a8abd8cceb
Fix boxing/unboxing for generic functions on index expressions
...
Unsubstituted type should be used for coercion to box value of
inline class type if it's needed. For the substituted value it's not
known if it was a generic parameter or not.
#KT-27502 Fixed
2018-10-12 11:58:56 +03:00
Anton Bannykh
8852ef9e75
[JS IR BE] fix multimodule
2018-10-11 16:02:21 +03:00
Svyatoslav Kuzmich
7074909230
[JS IR BE] Support enumValues<T>() and enumValueOf<T>(name)
2018-10-10 19:35:17 +03:00
Svyatoslav Kuzmich
0210ec3114
[JS BE] Fix KT-26787: handle JsSwitch in LabeledBlockToDoWhileTransformation
2018-10-10 19:35:16 +03:00
Anton Bannykh
44d56cb278
JS: fix val with backing field initialization in secondary constructors
...
This change reverts the AssignmentTranslator logic to a previous state
of "if we assign to a val, tranlate to backing field". Previously a
check whether or not we are inside of a constructor was added. The
check didn't detect secondary constructors, hence initializing of
val's with backing field started to work incorrectly.
The check itself was added in an attempt to prevent augmented assignment
operators to reference the backing field. The check seems to have been
wrong, because an augmented assignment could happen inside a construcotr.
A more correct fix was added later. It seems that it is safe now to
revert the logic back and rely on the frontend to only allow assignment
to a val property during initilization.
2018-10-10 17:25:55 +03:00
romanart
5af114da07
Add unit into compilation
2018-10-09 15:33:03 +03:00
Dmitry Petrov
b55b0c1ff1
Support local property delegation to inline class values
...
Also, add extra test on property delegation.
2018-10-03 11:09:48 +03:00