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
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
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
7b7b8fbea7
[Test] Filter dependent modules by source kind in creating FirModuleInfo
2021-02-18 14:44:44 +03:00
Dmitry Petrov
6d019d9544
JVM_IR indy-SAM on functional expression
2021-02-17 22:18:06 +03:00
Dmitry Petrov
56a104dda9
JVM_IR KT-44974 fix SAM-converted capturing extension lambda
2021-02-16 19:51:59 +03:00
Mikhael Bogdanov
f493766563
Add IR tests to Android codegen test
2021-02-15 11:24:10 +01:00
Dmitry Petrov
3ebeca5852
JVM_IR: use indy SAM conversions in jvmTarget 1.8+, fix bridges
...
KT-44278 KT-26060 KT-42621
2021-02-12 16:52:30 +03:00
Alexander Udalov
401f0ac583
Use TARGET_BACKEND instead of DONT_TARGET_EXACT_BACKEND in box against Java tests
...
"// TARGET_BACKEND: JVM" more clearly says that the test is
JVM-specific, rather than DONT_TARGET_EXACT_BACKEND which excludes all
other backends.
2021-02-11 13:50:08 +01:00
Dmitriy Novozhilov
606ae45f5f
[Test] Replace remaining KOTLIN_CONFIGURATION_FLAGS directives with specific ones
2021-02-10 13:02:06 +03:00
Mikhael Bogdanov
3dff225b98
Aligh test data with JDK 15 reflection output
2021-02-09 12:34:55 +01:00
Dmitriy Novozhilov
29b96aa15d
[Test] Properly merge box against java testdata into codegen/box
...
Previous commit about it was 3199ce03 and it was completely wrong
2021-02-04 10:53:50 +03:00
Alexander Udalov
d022bb0248
Switch default JVM target to 1.8
...
#KT-29405 Fixed
2021-02-01 11:54:04 +01:00
Dmitriy Novozhilov
af5a635f85
[Test] Ignore error diagnostics from FIR in some BB tests
2021-01-12 18:35:39 +03:00
Mikhail Glukhikh
776c4ba6ca
Add test for KT-25489 (to reproduce, turn UL classes OFF)
2020-12-25 14:06:16 +03:00
Jinseong Jeon
dea01125d6
FIR deserializer: keep SourceElement for more precise Fir2IrLazyClass's source
2020-12-18 12:17:23 +03:00
pyos
5efe774dba
FIR: remap Java meta-annotations to Kotlin equivalents
...
This is a direct port of JavaAnnotationMapper from the old frontend.
2020-12-10 20:52:43 +03:00
pyos
50ae360ff9
FIR2IR: fix the way annotations are moved to fields
...
1. When an annotation has multiple targets, the priority goes like this:
constructor parameter (if applicable) -> property -> backing field.
2. The argument to `kotlin.annotation.Target` is a vararg, so that
should be handled as well.
3. `AnnotationTarget.VALUE_PARAMETER` allows receivers, constructor
parameters, and setter parameters, while `AnnotationTarget.FIELD` allows
both backing fields and delegates.
Known issue: java.lang.annotation.Target is not remapped to the Kotlin
equivalent, so things are still broken for pure Java annotations.
2020-11-30 20:29:18 +03:00
Svyatoslav Kuzmich
f9503efb74
[JS IR] Make WITH_RUNTIME imply KJS_WITH_FULL_RUNTIME
...
There is a lot of intersection between these
2020-11-25 21:22:39 +03:00
Victor Petukhov
04846ca47a
Rework checking constraints by presented OnlyInputTypes annotation in accordance with changed incorporation mechanism
2020-11-25 11:15:23 +03:00
Svyatoslav Kuzmich
fdd7fa5aea
[Wasm] Mute codegen box tests
2020-11-09 16:04:43 +03:00
Denis Zharkov
7b48625b58
FIR: Remove FirCallableSymbol::overriddenSymbol
2020-11-06 14:44:27 +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
Jinseong Jeon
01d852c006
FIR: carry annotations on delegated property accessors
2020-09-29 11:35:19 +03:00
Jinseong Jeon
f3db113a82
FIR2IR: use @Target to put annotations on either property or backing field
2020-09-25 14:45:49 +03:00
Dmitry Petrov
cd37301ea2
Minor: TARGET_BACKEND=JVM in JVM-specific tests
2020-09-23 18:14: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
Mikhael Bogdanov
7d4a734791
Fix nullability of typePath parameter
...
#KT-41484 Fixed
2020-09-22 15:37:02 +02:00
Mikhail Glukhikh
8379b3794a
[FIR2IR] Return fallback mode for annotation resolved placeholder
2020-08-04 08:59:15 +03:00
Dmitriy Novozhilov
721b9b4d8c
[FIR] Resolve annotations as calls
2020-08-04 08:59:14 +03:00
Jinseong Jeon
bff36e0199
FIR2IR: convert annotations on FirTypeRef
2020-07-30 11:25:36 +03:00
Dmitry Petrov
4fdccb3b35
JVM_IR: don't generate repeated ElementType values in @Target
2020-07-28 18:19:20 +03:00
Jinseong Jeon
628b8b56b7
FIR2IR: convert annotations on type aliases
2020-07-20 09:40:52 +03:00
Jinseong Jeon
13ef97e51e
FIR2IR: set proper visibility of backing fields with @JvmField
2020-07-17 12:42:11 +03:00
Jinseong Jeon
f3475fd098
FIR2IR: store and convert annotations on enum entry
2020-07-17 09:48:45 +03:00
Jinseong Jeon
50f1f8f0eb
FIR: consider more functional types during SAM resolution
2020-07-16 12:56:18 +03:00
Jinseong Jeon
5c4f978073
FIR: transform arrayOf call with empty arguments
2020-07-15 13:36:30 +03:00
Jinseong Jeon
5600eefea5
FIR: add support for varargs in annotation calls
2020-07-15 13:36:30 +03:00
Ivan Kylchik
27c52f54ca
Remove IGNORE_FIR from tests that are passing after constant folding
2020-06-24 16:12:59 +03:00
Mikhail Glukhikh
0622be14a5
[FIR2IR] Introduce creation of Fir2Ir lazy classes
2020-06-23 19:06:07 +03:00
Jinseong Jeon
ab2a2b3a87
FIR2IR: eager conversion of annotations in Library class and members
2020-06-11 10:57:51 +03:00
Jinseong Jeon
4a511c7721
FIR: extend arrayOf call transformation to other variants
2020-06-01 10:45:42 +03: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
Mikhail Zarechenskiy
8bdc4d34f7
[NI] Commonize type-conversions (SAM/Suspend)
...
- Allow participating subtypes of functional types in conversions
- Fix several subtle inconsistencies
- Place logic about conversions at one place
Now conversions operations have two stages: before usual subtyping
check and after one. This is needed to support conversions of
subtypes (of functional types, for example). First, the compiler
checks if it possible to resolve an argument without conversion and
only then it tries to perform conversion.
Note that it'd be incorrect to perform conversion eagerly as it can
change resolve (Runnable & () -> Unit <: KRunnable), plus we can't
guess whether conversion is needed at all as it's important not to
look into supertypes if resolution doesn't actually needed it
#KT-36448 Fixed
#KT-37574 Fixed
#KT-38604 Fixed
2020-05-20 15:30:14 +03:00
Jinseong Jeon
615636ed55
FIR2IR: apply SAM conversion to arguments of functional type.
2020-05-15 15:08:43 +03:00
Mikhail Glukhikh
e7e80be34a
[FIR2IR] Populate overridden symbols even for !isOverride
...
Before this commit we considered !isOverride as a sign that
function / field / accessor has no overridden symbols.
However, it's false for deserialized, because isOverride
is always false there.
This commit fixes 68 BB tests but breaks 25 BB tests (not yet muted)
2020-05-14 13:40:36 +03:00
Jinseong Jeon
931ba4892a
FIR2IR: split property annotations according to use-site targets.
2020-05-14 09:41:11 +03:00
Mikhail Glukhikh
b271b6d7a8
[FIR2IR] Add conversion of value parameter annotations
2020-05-08 17:30:28 +03:00