Mikhail Zarechenskiy
eacc94a89d
Do not hide synthetic properties except isEmpty from Java
...
In order to hide synthetic property isEmpty from JDK 15, there was
added additional logic in 5cc12b49fc but
it also lead to the fact that now it's impossible to call synthetic
property `declaringClass` on `Enum` as it's in the same list as method
isEmpty(). Note that it's questionable behavior, probably we should
also hide `declaringClass` as well but for now we turn it back to
preserve compatibility
#KT-42467 Fixed
2020-10-15 12:26:17 +03:00
Jinseong Jeon
5f64d6ec76
FIR2IR: add support for callable reference to Java field
...
#KT-42656 Fixed
2020-10-15 08:47:46 +03:00
Jinseong Jeon
65545a10c4
FIR: reproduce KT-42656
2020-10-15 08:47:46 +03:00
Alexander Udalov
45a0850d95
Fix KotlinType.isNullabilityFlexible for types based on type parameters
...
In the compiler, this function was used in psi2ir (and it affected
nullability annotations in the resulting JVM class files), in "useless
elvis with null on the right side" diagnostic checker, and in light
classes.
#KT-42650 Fixed
2020-10-14 19:32:51 +02:00
Alexander Udalov
fbf56c054b
JVM IR: fix names of $annotations methods for internal properties
...
#KT-40384 Fixed
2020-10-14 19:32:51 +02:00
Alexander Udalov
3f73be391f
JVM IR: fix names of $annotations methods with inline classes in signature
...
#KT-40385 Fixed
2020-10-14 19:31:58 +02:00
Alexander Udalov
1df3bafbaf
Minor, fix and unmute fieldNameClash.kt test
...
#KT-31927
2020-10-14 16:53:58 +02:00
Mikhail Glukhikh
babc7845af
FirSyntheticPropertiesScope: support case with derived getter
...
#KT-42496 Fixed
2020-10-14 16:33:44 +03:00
Mikhail Glukhikh
2f9b7495fc
[FIR2IR] Make safe call result always nullable
2020-10-14 16:33:37 +03:00
Dmitry Petrov
d623f4d1d6
Add test for KT-40190
2020-10-14 16:05:15 +03:00
Jinseong Jeon
4d28463f1a
FIR CLI: initialize module and dependencies
...
#KT-42624 Fixed
2020-10-14 14:56:37 +03:00
Dmitry Petrov
052f345a17
JVM_IR no generic signatures for abstract stubs KT-42609
2020-10-13 19:20:29 +03:00
Dmitry Petrov
c8bf74c7d5
Bytecode listing test fails if JVM and JVM_IR have same testData
2020-10-13 19:20:29 +03:00
Alexander Udalov
1b39a235d8
JVM IR: sort multifile part names in metadata
2020-10-13 16:40:53 +02:00
Alexander Udalov
b257b03152
JVM IR: do not generate JvmName on multifile parts
...
#KT-36970 Fixed
2020-10-13 16:40:52 +02:00
Jinseong Jeon
bc6693fa6e
FIR2IR: element-wise SAM conversion for vararg
2020-10-13 15:40:06 +03:00
Pavel Kirpichenkov
9dd3d8fb14
[NI] Fix extension function check after commonization
...
`isExtensionFunction` property is false for suspend functions
2020-10-13 11:00:21 +03:00
Pavel Kirpichenkov
c53011dd04
[FIR] mute builder inference test
...
^KT-42591 Open
2020-10-13 11:00:21 +03:00
Pavel Kirpichenkov
39a87435ee
[FIR/NI] Refactor type variable gathering from lambda types
...
Motivation:
- drop getArguments from type context as a duplicate of getArgumentList
- reduce the number of collection allocations in getAllDeeplyRelatedTypeVariables
Additional minor improvements, test data fixes
2020-10-13 11:00:21 +03:00
Pavel Kirpichenkov
712a2ce1ab
[FIR] Improved lambda completion: initial implementation
...
Repeat the logic of KotlinConstraintSystemCompleter in ConstraintSystemCompleter.
Implement additional context operations required for updated lambda completion algorithm.
2020-10-13 11:00:21 +03:00
Victor Petukhov
0685beb765
NI: do substitution type variables during updating trace for lambda (these type variables can appear after the builder inference)
...
^KT-42450 Fixed
2020-10-13 10:21:55 +03:00
Alexander Udalov
e399b4cd12
JVM IR: minor, sort ElementType fields as in the old backend
...
In the old backend, targets are generated in the order of their
declaration in the ElementType enum, see AnnotationCodegen.java:306
(EnumSet guarantees such iteration ordering).
This has no effect other than reducing non-essential differences when
comparing ABI of JVM vs JVM_IR.
2020-10-12 21:38:09 +02:00
Alexander Udalov
1daeebcdd3
Minor, add regression test
...
#KT-42562
2020-10-12 21:37:37 +02:00
pyos
1663619606
JVM_IR: add local delegated property metadata to non-synthetic classes
...
Otherwise kotlin-reflect won't find it (and it won't even be serialized
anyway).
#KT-42562 Fixed
2020-10-12 21:14:00 +02:00
Ilmir Usmanov
3b5706972e
Extract effect from lambda argument if it is in parentheses
...
Otherwise, contracts on the parameter have no effect.
#KT-42044 Fixed
#KT-26229 Fixed
2020-10-12 20:16:19 +02:00
Dmitry Petrov
df64bb3eb7
JVM_IR emulate JVM hack for generic signatures in KT-18189
...
KT-40307
See also KT-42609
2020-10-12 21:14:48 +03:00
Alexander Udalov
ac39e4d89c
Minor, add regression test
...
#KT-42554
2020-10-09 22:11:37 +02:00
pyos
e6c0575d3a
JVM_IR: do not deep-copy suspend lambdas in initializers
...
This loses reflection metadata (and also sometimes fails). Which was
missing anyway - this is also fixed now.
#KT-42554 Fixed
2020-10-09 22:11:00 +02:00
Mark Punzalan
8bc7370b92
ForLoopsLowering: Add PLUSEQ origin to increment to use IINC
...
instructions if possible.
2020-10-09 21:34:56 +02:00
Mark Punzalan
ccbf7cc2ee
ForLoopsLowering: Use last-exclusive for-loops for optimized until
...
progressions instead of decrementing "last".
#KT-41352 Fixed
2020-10-09 21:34:56 +02:00
Mark Punzalan
a093efde11
Add blackbox test for KT-42533.
2020-10-09 21:34:56 +02:00
Ilmir Usmanov
375d92cf67
Merge two consequent records in LVT
...
Otherwise, atomicfu will be unable to transform atomic variable usages.
2020-10-09 18:36:37 +02:00
Dmitry Petrov
91b8e32d43
Add ABI tests for classes extending Number and CharSequence
2020-10-09 16:36:35 +03:00
Dmitry Petrov
a412596d8e
JVM_IR emulate old back-end behavior in special bridges + inline classes
...
KT-42491 KT-42539
2020-10-09 16:06:08 +03:00
Jinseong Jeon
8c88670185
FIR: copy constructor for typealias'ed inner/nested class
2020-10-08 16:33:13 +03:00
Alexander Udalov
2f003bdcb5
Minor, add regression test
...
#KT-42527
2020-10-07 21:31:43 +02:00
pyos
dd1682510f
JVM_IR: generate accessors for inherited abstract members too
...
#KT-41468 Fixed
2020-10-07 21:23:18 +02:00
pyos
98088f739d
PSI2IR: do not generate when subjects multiple times
...
`in x` is represented as `<subject expression> in x` in psi, so
generating the entire call and then replacing the argument with a read
of a temporary results in redundant regenerations of the subject.
#KT-42054 Fixed
#KT-42455 Fixed
2020-10-07 17:22:25 +03:00
Alexander Udalov
e280416fe2
Minor, add regression test
2020-10-07 14:31:01 +02:00
pyos
a6c62d3339
JVM_IR: do not inherit delegated property trackers
...
This is no longer needed now that lambdas are generated before
`$$delegatedProperties`.
2020-10-07 14:30:36 +02:00
pyos
adcbfc7b4c
IR: add an emptiness check to all unsigned until loops
...
Unlike signed integers, a larger unsigned type does not mean a lower
minimum value, so `x - 1` can overflow even if `x` is casted to a larger
type.
#KT-42186 Fixed
2020-10-07 12:53:00 +02:00
pyos
4a03006162
Generate min/max constants as non-const in ranges tests
...
in order to make them appear as unknown values to codegen.
2020-10-07 12:53:00 +02:00
Pavel Punegov
260f66183c
Don't ignore the test on JS backend as it doesn't fail any more.
2020-10-07 12:22:49 +03:00
Pavel Punegov
a439860e12
Replace IGNORE_BACKENDs to TARGET_BACKEND for the Java test
2020-10-07 12:18:09 +03:00
Pavel Punegov
4d8ca074bc
Ignore test for the full reflection in Native
2020-10-07 12:18:09 +03:00
Pavel Punegov
33d28b44fa
Unmute typeOf tests in Native backend
2020-10-07 12:18:09 +03:00
Mikhail Glukhikh
aa4a042612
[FIR2IR] Use deepest matching symbol also for synthetic properties
...
#KT-42359 Fixed
2020-10-07 10:43:43 +03:00
Jinseong Jeon
49307e243c
FIR deserializer: load annotations on default accessors
2020-10-07 09:46:40 +03:00
pyos
a6d5c02d9b
JVM_IR: add a transformChildren call to PropertyReferenceLowering
...
#KT-42354 Fixed
2020-10-06 17:06:34 +02:00
Dmitry Petrov
b1bd138afb
JVM_IR fix inline class <-> collection stubs issues
...
Move collectionStubMethodLowering before jvmInlineClassPhase, and make
them interact properly.
Note that some issues still remain in inline class <-> special bridges
interaction.
KT-40187 KT-42469
2020-10-06 17:08:24 +03:00