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
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
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
33d28b44fa
Unmute typeOf tests in Native backend
2020-10-07 12:18:09 +03:00
Denis Zharkov
3dfbd36f15
FIR: Unmute passing blackbox tests
2020-10-01 17:49:02 +03:00
Jinseong Jeon
3151fc8577
FIR2IR: set dispatch receiver for companion member reference
...
#KT-42132 fixed
2020-09-29 11:51:21 +03:00
Dmitriy Novozhilov
40a9bb6eac
[FIR] Assume nullable types as good types for ILT approximation
...
#KT-41982 Fixed
2020-09-23 14:05:10 +03:00
pyos
6e143a2656
JVM_IR: collect free type parameters when serializing FIR metadata
...
The "free" in "createFreeFakeLambdaDescriptor" and such refers to the
fact that there are no references to type parameters from outside the
current declaration. This is necessary because at the point where the
metadata is written, the type parameters may not even be in scope (e.g.
local delegated properties are serialized at class level, but may refer
to function-scope type parameters).
2020-09-22 09:35:50 +03:00
pyos
aa58ed9234
JVM_IR: partially implement FIR local delegated property reflection
...
Type parameter references are broken, just like for lambdas. Also, the
code is super ugly.
2020-09-22 09:35:45 +03:00
Mikhail Glukhikh
4605a65f41
[FIR] Good test data fixes (around captured types)
2020-09-14 17:56:39 +03:00
Alexander Udalov
3d7619421f
JVM IR: fix exception on star projection in type parameter upper bound
...
#KT-41761 Fixed
2020-09-09 17:07:52 +02:00
Alexander Udalov
5aca8ebda8
Minor, add test case on metadata of lambdas in constructors
...
KT-41465
2020-09-02 20:04:05 +02:00
Dmitriy Novozhilov
b63257345b
[FIR] Map Class to KClass in java annotations
2020-08-04 08:59:15 +03:00
Jinseong Jeon
bff36e0199
FIR2IR: convert annotations on FirTypeRef
2020-07-30 11:25:36 +03:00
Zalim Bashorov
635869f15a
Rewrite className helper to fix tests on android
...
Since android tests preprocess test data and
(at least) replace package for files and fix package usages
it's preferred to use fqnames explicitly
instead of assembly them from parts, as it was before.
2020-07-25 15:28:36 +03:00
Dmitriy Novozhilov
1ce4eca3a6
[FIR] Infer type arguments for captured parameters of inner classes
...
KT-38992
2020-07-20 14:38:16 +03:00
Jinseong Jeon
13ef97e51e
FIR2IR: set proper visibility of backing fields with @JvmField
2020-07-17 12:42:11 +03:00
Jinseong Jeon
5600eefea5
FIR: add support for varargs in annotation calls
2020-07-15 13:36:30 +03:00
Jinseong Jeon
1a861b2df9
FIR2IR: don't create synthetic class for enum entry w/o members
2020-07-15 13:36:30 +03:00
Zalim Bashorov
340512e27a
[KJS] Throw exception on recursive types provided to typeOf and provide proper support later within KT-40173
...
#KT-38140 fixed
2020-07-14 14:14:13 +03:00
Zalim Bashorov
ca37c6bfe6
[KJS FE] Allow using typeOf with non-reified type parameters
...
#KT-38771 fixed
2020-07-14 14:14:11 +03:00
Mikhail Glukhikh
6b964cb61d
[FIR2IR] Drop explicit receiver double-conversion for objects
2020-07-10 08:56:58 +03:00
Dmitry Petrov
761e47264a
JVM_IR: fix property reference generation for inline class primary val
2020-07-03 17:51:30 +03:00
Dmitry Petrov
8da988b18e
JVM_IR: Mangle primary val getter of inline class if required
...
TODO fix reflection
2020-07-02 22:39:06 +03:00
Dmitriy Novozhilov
624b9306f0
[FIR] Resolve LHS of type operator call in independent context
...
#KT-39046 Fixed
2020-07-02 15:10:51 +03:00
Jinseong Jeon
34174d6e7d
FIR deserializer: load annotations for property and fields, along with use-site targets
2020-06-30 17:28:22 +03:00
Ivan Kylchik
de2b20482a
Allow IrConstTransformer to visit and evaluate vararg elements
2020-06-29 15:27:25 +03:00
Ivan Kylchik
6fa03297f9
Allow IrConstTransformer to visit annotations of all declarations
2020-06-29 15:27:25 +03:00
Jinseong Jeon
856ac76c8f
FIR2IR: handle type alias inside GetClassCall
2020-06-23 09:46:47 +03:00
Ilya Gorbunov
7632910ffd
Drop deprecated CollectionAssertions.kt
...
Remove incorrect import from callByWithEmptyVarArg test
2020-06-22 12:29:25 +03:00
Jinseong Jeon
67044f22ed
FIR serializer: regard property accessors with modifiers as non-default
2020-06-22 12:25:47 +03:00
Dmitriy Novozhilov
87859b0faa
[FIR] Introduce new algorithm for building CFG for declarations
2020-06-19 15:53:00 +03:00
Jinseong Jeon
b076bec07f
FIR deserializer: signature-aware annotation loading for functions
2020-06-19 10:21:09 +03:00
Mikhail Glukhikh
b839a91050
Mute 3 FIR BB tests due to LowPriorityInOverloadResolution in reflect
...
Recently second javaType function appeared in reflect and
now FIR can't correctly resolve the code :(.
Will be fixed after annotation deserialization full support
2020-06-18 13:39:48 +03:00
Mikhail Glukhikh
d009c90e3a
Revert "Mute two FIR BB tests due to LowPriorityInOverloadResolution in reflect"
...
This reverts commit 3768af4f
2020-06-18 13:24:38 +03:00
Mikhail Glukhikh
3768af4f92
Mute two FIR BB tests due to LowPriorityInOverloadResolution in reflect
...
Recently second javaType function appeared in reflect and
now FIR can't correctly resolve the code :(.
Will be fixed after annotation deserialization full support
2020-06-18 13:21:35 +03:00
Alexander Udalov
117aae8a6b
Use experimental javaType in full reflect where it's not supported yet
...
#KT-22936 Fixed
#KT-34344 Fixed
2020-06-17 18:33:08 +02:00
Jinseong Jeon
ab2a2b3a87
FIR2IR: eager conversion of annotations in Library class and members
2020-06-11 10:57:51 +03:00
Jinseong Jeon
ba1172b3ad
FIR2IR: distinguish substitution case when adding external fake overrides
2020-06-08 12:11:34 +03:00
Jinseong Jeon
0d2552b0b6
FIR: record and serialize the modifier "fun" for functional interface
2020-06-08 09:42:32 +03:00
Jinseong Jeon
89c87f941f
FIR: consider the absence of type arguments when constructing GetClassCall type
2020-06-05 17:00:17 +03:00
Mikhail Glukhikh
6ad37eb7a8
Unmute two more FIR BB tests
2020-06-04 17:26:27 +03:00
Mark Punzalan
802beb49a6
Use TypeSubstitutor to get the substituted underlying type for inline
...
classes, instead of MemberScope.
The primary motivation was to fix issues around type-mapping for inline
classes in FIR, which uses wrapped descriptors that have empty
MemberScopes.
2020-06-04 17:03:55 +03:00
Mikhail Glukhikh
0ce47f2f12
[FIR TEST] Mute 2 BB tests broken by 0d6e3093
2020-06-04 16:34:39 +03:00
Jinseong Jeon
0d6e309372
FIR: construct type with actual type arguments during GetClassCall transformation
2020-06-04 10:13:37 +03:00
Jinseong Jeon
6eb21031b2
FIR JVM serializer: serialize property signature
2020-06-02 12:00:52 +03:00
Alexander Udalov
1f1790d60e
Do not rely on descriptors in KParameterImpl.equals/hashCode
...
For the same reason as in the previous commit: descriptors are cached
via weak references in moduleByClassLoader.kt and can be
garbage-collected at any point. So different instances of KParameterImpl
representing the same parameter may store different instances of
descriptors.
2020-05-28 14:17:37 +02:00
Alexander Udalov
55f384cb04
Do not rely on descriptors in KTypeParameterImpl.equals/hashCode
...
Descriptors are cached via weak references in moduleByClassLoader.kt and
can be garbage-collected at any point. So relying on identity of
descriptors in KTypeParameterImpl is dangerous because the same type
parameter can be represented by different descriptors. For example, the
test equalsOnFunctionParameters.kt was flaky before this change because
of this issue, and that could be reproduced by running it a few hundred
times in the same process.
Instead, use the type parameter's container (which is either KClass or
KCallable) and name, in equals/hashCode. KClass and KCallable already
have equals/hashCode independent of descriptors, so this works in case
the descriptor is invalidated.
2020-05-28 14:17:37 +02:00
Jinseong Jeon
18953c4717
FIR: transform resolved arrayOf call inside annotation to FirArrayOfCall
2020-05-27 11:38:34 +03:00
Vitaly
fe047f9b47
[JS BE] mutes tests for JS_IR_ES6, which muted for JS_IR
2020-05-27 00:32:56 +03:00