Commit Graph

135 Commits

Author SHA1 Message Date
Denis.Zharkov d76db0e011 FIR: Mute backend tests relevant to new INFERENCE_NO_INFORMATION_FOR_PARAMETER
See KT-46967 and KT-46996
2021-06-07 15:25:53 +03:00
Mikhael Bogdanov a8186d19d6 Support annotations on class type parameters
#KT-43714
2021-06-01 06:33:50 +02:00
Andrey Zinovyev c2389a94fa [FIR] Resolve annotations in when expressions 2021-05-27 12:41:16 +03:00
Mikhael Bogdanov cd7841ceed Generate type annotations on class type parameters bounds
#KT-13228
 #KT-46539 Fixed
2021-05-10 12:12:21 +03:00
Mikhael Bogdanov cbe3c66156 Generate function type parameter annotations and type annotations on their bounds into bytecode
Generate type parameter annotation by default for `-Xjvm-target 1.8` and above

 #KT-46539
 #KT-13228
 #KT-46545 Fixed
2021-05-10 12:12:18 +03:00
pyos e6d923f65c FIR: rename HIDDEN to INVISIBLE_REFERENCE
Some of them should be INVISIBLE_MEMBER though
2021-04-21 16:18:21 +03:00
pyos 651fd4ad9f FIR: load Java annotation defaults after binding the class symbol
as they can refer to the class itself.
2021-03-24 16:09: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
pyos 1a57d60f68 FIR: do not eagerly resolve class references in imported annotations 2021-03-15 17:32:39 +03:00
Dmitriy Novozhilov 4d65b0ef5a [FIR2IR] Unmute passing black box test 2021-03-15 15:12:11 +03:00
Roman Artemev 050db6d454 [KLIB] Add box test for generic annotations 2021-03-12 19:03:04 +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
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