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
Mikhael Bogdanov
ad8eddac99
Add test for private suspend and JVM defaults
2021-03-01 16:20:19 +01:00
Mikhael Bogdanov
8764bb09f2
Generate synthetic annotation method in interface if -Xjvm-default is on
2021-03-01 16:20:19 +01:00
Stanislav Erokhin
f77ba914c7
[MERGE] Kotlin/Native history merged into kotlin/master
2021-02-26 15:30:58 +01:00
Alexander Udalov
417eb60ed3
Revert "Change order of WITH_RUNTIME and FILE. Wrong order brakes module pattern."
...
This reverts commit 073a500370 .
(cherry picked from commit eec98314c8 )
2021-02-26 12:51:53 +01:00
Mikhail Glukhikh
2bf3abcb29
FIR: cache accessor symbols in JavaClassUseSiteMemberScope
2021-02-26 12:27:07 +03:00
Alexander Udalov
acc2256de9
IR: support smart cast values in RangeContainsLowering
...
#KT-44878 Fixed
2021-02-25 21:00:09 +01:00
Victor Petukhov
94e6ec7dfd
Fix test after 27846f4532
2021-02-25 22:29:45 +03:00
Denis.Zharkov
4fffe7b9c8
FIR: Fix VerifyError caused by private delegates
...
^KT-45048 Fixed
2021-02-25 19:30:15 +03:00
Victor Petukhov
27846f4532
Add tests for obsolete issues (KT-42722, KT-39880)
2021-02-25 15:30:29 +03:00
Dmitriy Novozhilov
4222bb9af2
[FE] Make whens on expect sealed classes and enums not exhaustive
2021-02-25 14:56:08 +03:00
Vasily Levchenko
0324ee508e
[testData][compiler] disable tests KT4282{4,5} for native backend
2021-02-24 11:07:16 +01:00
Igor Chevdar
9d8abca195
[box-tests] Disabled a test for K/N
2021-02-24 11:00:27 +05:00
Mads Ager
8852323a76
[PSI2IR] Do not generate property reference setter if inaccessible.
...
Fixes KT-45064.
2021-02-23 19:33:49 +01:00
Ilmir Usmanov
d44799fa78
JVM IR: Use INVOKESPECIAL instead of INVOKEVIRTUAL for default private
...
suspend functions.
#KT-26592
2021-02-23 18:49:10 +01:00
Ilmir Usmanov
3ee62cb1b2
JVM IR: Do not generate private suspend functions as synthetic package-private
...
#KT-26592
2021-02-23 18:49:06 +01:00
Alexander Udalov
e6476c39ca
JVM IR: fix isMarkedNullable for nullability-flexible types
...
Since nullability-flexible types in IR are represented by an annotation
on an IrSimpleType, not a special instance, the common implementation of
`KotlinTypeMarker.isMarkedNullable` in `TypeSystemContext` doesn't work.
This method is used for example to generate `typeOf` in JVM IR, in
`TypeSystemCommonBackendContext.generateTypeOf`, and this issue led to a
difference in behavior of `typeOf` for nullability-flexible types.
#KT-44726 Fixed
2021-02-22 12:52:48 +01:00
Alexander Udalov
eec98314c8
Revert "Change order of WITH_RUNTIME and FILE. Wrong order brakes module pattern."
...
This reverts commit 073a500370 .
2021-02-22 10:14:32 +01:00
Pavel Punegov
073a500370
Change order of WITH_RUNTIME and FILE. Wrong order brakes module pattern.
2021-02-21 11:12:33 +03:00
Pavel Punegov
95a8c60a9c
Ignore test in Native backend. Test overrides kotlin.Result
2021-02-21 11:11:46 +03:00