Dmitry Petrov
3efb07bf7b
Return kotlin ctor mapped to a java ctor even if java ctor is synthetic
...
This allows working with constructors with inline class parameters using
Kotlin reflection, as described in
https://youtrack.jetbrains.com/issue/KT-27429#focus=streamItem-27-3161148-0-0
#KT-27913
#KT-27429
2018-11-20 09:53:18 +03:00
Dmitry Petrov
9082f19c00
KT-25907: Use proper loop parameter type in for-in-CharSequence
2018-11-20 09:52:09 +03:00
Dmitry Petrov
90da274eaa
KT-28054: Treat inline class constructor accessors specially
2018-11-19 09:42:03 +03:00
Mikhail Zarechenskiy
3a93cab3b6
Mark JVM specific test with TARGET_BACKEND directive
...
This is needed to avoid test failing for Kotlin/Native
2018-11-17 22:55:18 +03:00
Alexander Udalov
1a2579d8e8
Minor, add test for obsolete issue
...
#KT-21692 Obsolete
2018-11-15 20:29:34 +01:00
Roman Artemev
d5acc8ff5b
[JS BE] Set enclosing exception state in finally block
...
[Fix KT-28207]
2018-11-15 18:44:22 +03:00
Dmitry Petrov
08f23d981b
Minor: generated tests
2018-11-14 13:01:00 +03:00
Mikhail Zarechenskiy
35fb3ba096
Fix CCE when unboxed inline class receiver is passed to inline function
...
Initial problem is started in `capturedBoundReferenceReceiver` method
where we assume that bound receiver is captured for usual call.
Note that if method is inline then we don't pass actual name reference
receiver, but pass special CAPTURED_RECEIVER_FIELD, which is then
is used to find special instructions during inline and fold several
instructions in `foldFieldAccessChainIfNeeded`.
As a result, we got unboxed reference receiver for inline call, which
caused CCE and to fix it we should box receiver one more time during
inline
#KT-28188 Fixed
2018-11-14 11:21:04 +03:00
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
Alexander Udalov
49d6a7a7cb
Refactor and improve code obtaining actual Java annotation parameter values
...
Extract Java-specific code into module 'frontend.java' and use already
existing JavaAnnotationArgument facilities to determine the default
parameter value in an actual Java annotation class.
Annotation arguments are not yet supported because to create an instance
of AnnotationValue, we need a descriptor, which is not available at this
point.
#KT-22704 In Progress
#KT-28077 Open
2018-11-13 19:05:14 +01: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
Nikolay Krasko
2284028bbe
Add bodyBlockExpression() helper function to KtDeclarationWithBody
2018-11-12 13:38:28 +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
8f2117685f
[JS BE] Support contracts in JS Fix KT-27946
2018-11-08 17:35:06 +03:00
Roman Artemev
b010d9eef8
Add Contract tests for JS
2018-11-08 17:35:06 +03:00
Dmitry Petrov
b5664755c8
Minor: remove IGNORE_BACKEND for passing JS_IR tests
2018-11-08 12:29:15 +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
59009430e5
JS: report inline suspend functions to IC
...
* Also inline suspend lambda'a
* Also use correct JsName's in exported suspend inline fun's
* Also use less unused imports
2018-11-07 12:11:01 +03:00
Anton Bannykh
82268cd95d
JS: fix concurrent access to NameSuggestion.cache
2018-11-07 12:07:58 +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
Alexander Udalov
911420d823
Minor, move InlineOnly-related utilities to frontend
2018-10-31 17:21:06 +01:00
Roman Artemev
fb499def59
Update tests
2018-10-25 15:49:21 +03:00
Roman Artemev
9515de0b7e
[JS IR BE] Fix name clash between top-level fields
2018-10-25 15:48:42 +03:00
Roman Artemev
59b1743c37
Add tests
2018-10-25 15:48:42 +03:00
Roman Artemev
7cb202934c
Update 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
b83df18e22
[JS IR BE] make default argument lowering support per-file mode
2018-10-19 23:49:18 +03:00
Roman Artemev
4c30888d89
Fix test data
2018-10-19 19:38:00 +03:00
Roman Artemev
1338d6d66f
Update tests
2018-10-19 14:07:20 +03:00
romanart
0260dc813f
Update tests
2018-10-19 14:03:06 +03:00
Anton Bannykh
3a105debb3
[JS IR BE] fix default arguments lowering
2018-10-18 14:25:48 +03: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
Alexander Udalov
f868964e25
Fix most unchecked/deprecation javac warnings in compiler modules
2018-10-17 18:39:49 +02:00
Alexander Udalov
23c210e9f2
Use JvmWildcard on return type of getContributedVariables/getContributedFunctions
2018-10-17 18:39:49 +02:00
romanart
47b8e54f84
Update test data
2018-10-17 18:33:52 +03:00
Zalim Bashorov
8ac2582e24
Forward gradle properties with prefix "fd." to test runner as system property("-D") w/o this prefix
2018-10-17 18:29:41 +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