Ilmir Usmanov
e47715f52b
Minor. Add tests with returning inline class from SAM adapter
2021-03-16 20:57:05 +01:00
Georgy Bronnikov
3a10ea4f88
JVM_IR: synchronize code generation for inline functions
2021-03-16 19:49:29 +03:00
Dmitry Petrov
decfaa3ba5
JVM_IR KT-44993 preserve inner expression type when fusing if-null
2021-03-16 15:30:45 +03:00
Dmitry Petrov
d74168fb8f
PSI2IR KT-44414 fix adapted reference to imported object member
2021-03-15 21:24:25 +03:00
Mikhail Glukhikh
e7129329d2
Revert "FIR: do not eagerly resolve class references in imported annotations"
...
This reverts commit 1a57d60f
2021-03-15 18:36:13 +03:00
Alexander Udalov
fc36178f3a
Annotate kotlin.reflect.jvm.reflect with ExperimentalReflectionOnLambdas
...
This function was always experimental, as explained in its kdoc, but it
was introduced before opt-in requirement markers were supported. Thus,
breaking changes (such as in KT-42746) were always expected, and the
`@ExperimentalReflectionOnLambdas` annotation just makes it clearer.
#KT-45486 Fixed
2021-03-15 15:54:31 +01:00
pyos
43140db65e
FIR2IR: better filter out non-declared data class properties
2021-03-15 17:32:41 +03:00
pyos
1a57d60f68
FIR: do not eagerly resolve class references in imported annotations
2021-03-15 17:32:39 +03:00
Dmitry Petrov
e630e00e99
JVM_IR KT-44744 check accessibility of enum entry 'this'
2021-03-15 17:26:49 +03:00
Dmitriy Novozhilov
4d65b0ef5a
[FIR2IR] Unmute passing black box test
2021-03-15 15:12:11 +03:00
Dmitriy Novozhilov
3d1f4b8386
[FIR] Don't add @EnhancedVisibility to types with @Nullable annotation
2021-03-15 12:13:06 +03:00
Ilmir Usmanov
c9f41a2440
Minor. Ignore tests on WASM
2021-03-15 06:14:44 +01:00
Ilmir Usmanov
149064803d
JVM_IR: Do not unbox Result argument inside java SAM adapters
...
#KT-45259
2021-03-15 06:14:42 +01:00
Ilmir Usmanov
4099dfc7e0
JVM_IR: Do not unbox Result argument inside SAM adapters
...
#KT-45259 Fixed
2021-03-15 06:14:40 +01:00
Abduqodiri Qurbonzoda
77c263fcc4
Mark kt45410.kt with TARGET_BACKEND: JVM
2021-03-13 02:30:24 +03:00
Ilmir Usmanov
6429ac17d8
Revert "Raise RESERVED_VAR_PROPERTY_OF_VALUE_CLASS to error"
...
This reverts commit bad197e075 .
2021-03-12 17:51:21 +01:00
Roman Artemev
050db6d454
[KLIB] Add box test for generic annotations
2021-03-12 19:03:04 +03:00
Mads Ager
8588412a56
[JVM IR] Support break in do-while condition.
...
This breaks from the loop itself which is inconsistent with
what happens for breaks in while conditions.
Also, the frontend will report that code after the loop is
unreachable, which it isn't. :-\
However, those issues are covered in
https://youtrack.jetbrains.com/issue/KT-17728 , so for now
we follow the old backend to not "break" anyone. :)
Fixes KT-44412
2021-03-12 13:46:27 +01:00
Dmitry Petrov
d0d3b57366
Minor: mute test in FIR
2021-03-12 15:08:24 +03:00
Victor Petukhov
7f7bb70596
Don't fix a type variable into the intersection type if there is an explicit expected type
...
^KT-43303 Fixed
^KT-42396 Fixed
^KT-42472 Fixed
2021-03-12 14:36:53 +03:00
Dmitry Petrov
44e6483090
JVM_IR Spill stack on array constructor call
...
KT-42932
2021-03-12 09:18:35 +03:00
Dmitriy Novozhilov
65ea4e184a
[FIR] Fix enhancement of FlexibleNullability and EnhancedNullability
...
- Add utilities to add new attribute to ConeAttributes
- Get rid of FlexibleNullability attribute (it can be easily inferred
for any flexible type at any moment)
- Fix determining of EnhancedNullability attribute
2021-03-11 13:10:04 +03:00
Dmitry Petrov
0cca07fa19
Bump d8 used in box tests to 2.1.75
2021-03-10 21:04:12 +03:00
Dmitry Petrov
737fbe271f
JVM_IR Do not generate generic signatures for lifted lambda methods
2021-03-10 21:04:11 +03:00
Alexander Udalov
bf844aa8e4
JVM IR: prevent behavior change with operator dot calls on literals
...
#KT-42321 Fixed
2021-03-10 18:46:30 +01:00
Mikhael Bogdanov
66a29c70bf
Use compatibility accessors only in compatibility stubs
2021-03-10 09:09:10 +00:00
Mikhael Bogdanov
efceb89b98
Don't generate private members in compatibility mode in DefaultImpls
2021-03-10 09:09:09 +00:00
Mikhael Bogdanov
f648d86d2b
Generate stubs for private function with default arguments as public in interfaces
2021-03-10 09:09:08 +00:00
Alexander Udalov
bdaeaca5ae
Psi2ir: do not generate default accessor body for expect properties
...
Because generateDefaultGetterBody/generateDefaultSetterBody reference
the property's backing field, which in case of extension properties
leads to an error "Unbound symbols not allowed" because extension
property cannot have a backing field.
In some way, this check is similar to the `isExpect` check in
`generatePrimaryConstructor`.
2021-03-09 20:51:02 +01:00
Alexander Udalov
5fc9f3bc17
Minor, add box test for unreachable uninitialized property
...
#KT-44496
2021-03-09 20:50:39 +01:00
Alexander Udalov
628d75c7cd
JVM: fix EnclosingMethod information for SAMs in inline lambdas
...
Pass parentContext to SamWrapperCodegen from the outside instead of
using the one from parentCodegen. The difference is that in case of an
inline lambda, we're creating an InlineLambdaContext whose parent is a
ClosureContext, but the codegen for that lambda has that latter
ClosureContext as its context. So the getNonInlineOuterContext call in
SamWrapperCodegen.generateInnerClassInformation wasn't able to identify
that this is a context of a lambda that needs to be skipped, and
generated it as EnclosingMethod, which caused Java reflection to fail
because once that lambda was inlined, it was removed and thus didn't
make it to runtime.
#KT-44827 Fixed
2021-03-09 11:43:11 +01:00
Mads Ager
7dbb0c7d20
[IR] Make IrGetObjectValue copyable to avoid duplicate IR nodes.
...
Fixes KT-45170
2021-03-09 09:48:16 +03:00
Alexander Udalov
6ddca4a592
Add KClass.isValue to kotlin-reflect
...
#KT-44782 Fixed
2021-03-08 21:22:40 +01:00
Alexander Udalov
8b8262096c
Fix testKt44814 by adding an IR dump
...
It's supposedly needed because of the `// DUMP_IR` directive.
2021-03-08 17:32:13 +01:00
Ilya Gorbunov
9cc8f44390
Support mod and floorDiv extensions in constant evaluator
...
Ignore evaluation tests for floorDiv and mod with FIR for now.
2021-03-05 23:46:57 +03:00
Ilya Gorbunov
58e6f775bb
Rename test of rem operator evaluation
2021-03-05 23:46:57 +03:00
Mads Ager
e5631addf3
[IR] Move annotations from original to new constructor declarations.
...
LocalDeclarationsLowering did not move annotations when creating
a new constructor declaration, thereby losing the annotations.
Fixes KT-45298
2021-03-05 12:24:38 -08:00
Mads Ager
965c118521
[JVM IR] Make upper bounds check recursive for ieee Equals.
...
Fixes KT-44402
2021-03-05 12:22:54 -08:00
Dmitriy Novozhilov
aa829c2321
[FIR2IR] Fix using default values of annotation arguments
2021-03-05 13:00:12 +03:00
Dmitriy Novozhilov
8324f499cd
[FIR] Fix serializing annotation metadata on setters value parameters
2021-03-05 13:00:11 +03:00
Dmitriy Novozhilov
a6d1d47918
[FIR] Fix clearing info about DF variable after reassignment
2021-03-04 17:09:17 +03:00
Mads Ager
8e9dfc23b6
FIR: Take targeted annotations into account for metadata
...
Getter/setter targeted annotations were not correctly reflected
in the kotlin metadata which made them not work with
kotlin-reflect.
2021-03-03 08:48:28 +03:00
Dmitriy Novozhilov
714c2a8f93
[FIR] Bind return expression to function symbol instead of function itself
2021-03-02 19:11:27 +03:00
Dmitriy Novozhilov
245bc7c8e2
[FIR2IR] Fix interpreting constants from const properties from other module
2021-03-02 19:11:26 +03:00
Dmitriy Novozhilov
a7e6667648
[FIR] Properly deserialize annotations of properties in interfaces
2021-03-02 19:11:24 +03:00
Dmitriy Novozhilov
da0fd7cc15
[FIR2IR] Approximate non-denotable types when converting ConeType to IrType
2021-03-02 19:11:21 +03:00
Dmitriy Novozhilov
af79265f42
[FIR] Fix creating overrides for functions with name same as renamed in JVM builtins
2021-03-02 19:11:15 +03:00
Mikhael Bogdanov
77559e8299
Temporary mute reflection test on Android
2021-03-01 18:05:27 +01:00
Mikhael Bogdanov
49aa36b70d
Generate local delegated properties in interface in jvm-default all modes
2021-03-01 16:20:20 +01:00
Mikhael Bogdanov
c25a694b6b
Generate private suspend functions as private (not synthetic package-private)
...
#KT-26592 Fixed
2021-03-01 16:20:19 +01:00