Commit Graph

63 Commits

Author SHA1 Message Date
Jinseong Jeon 5aa8e2d0d1 FIR LC: fix nullable annotation on return type of suspend function 2021-11-01 19:19:39 +01:00
Jinseong Jeon 5880d80d26 FIR LC: add support for inline class 2021-11-01 19:17:26 +01:00
Stanislav Erokhin c591601274 [LC] IDE LightClasses testdata update
Unfortunately, the same testdata is used in IDE, so we should change
testdata in compiler repo and this will affect IDE repo.
This commit is the cherry-pick of commits from IDE repo:
- 4310d730795a53a Fix UltraLightClassLoadingTestGenerated.testEnums():
       check by Java file as ULC produces a different but better result
       Yan Zhulanow 3/17/21, 8:57 AM
- fbe3c8ba0841f2d4 Disable comparison test for
       UltraLightClassSanityTestGenerated.
       testAnnotatedPropertyWithSites() Yan Zhulanow 3/18/21, 1:33 PM
- 8fc53027343b5b53 Ignore known (for ages) broken behaviour
       of LC Vladimir Dolzhenko 3/19/21, 11:17 PM
2021-11-01 10:38:09 +00:00
Stanislav Erokhin f455141ade [ULC] Fix rendering for Foo.class in annotation value
Previously it was Foo::class, but it isn't correct because in java it
is Foo.class

P.s. Array<Foo> cannot be passed as annotation parameter
2021-11-01 10:38:09 +00:00
Jinseong Jeon aad02c1259 FIR LC: introduce modifier list for members
to simulate `default` modifier of methods in interface
2021-09-29 22:02:48 +02:00
Jinseong Jeon c2964f688e FIR LC: don't include annotations w/o use-site targets to property accessors 2021-09-09 16:07:09 +02:00
Igor Yakovlev e4870740e1 [LC] Fixed light classes nullability for Kotlin 1.5
Fixed #KT-44472
2021-04-20 15:21:12 +02:00
Igor Yakovlev 63160293fb [LC] Fix invalid nullability for properties
Fixed #KT-46097 and #KT-41671
2021-04-20 15:21:12 +02:00
Mikhail Zarechenskiy 111e54c8c1 Do not generate DefaultImpls for light classes if not needed
#KT-41130 In Progress
2021-03-18 16:38:52 +03:00
Igor Yakovlev 023b7fbb8f [ULC] Fix invalid primitive type annotating
Fixed #KT-45417
2021-03-12 10:35:37 +01:00
Igor Yakovlev b744f41c0d [ULC] Fix annotations invalid parents
Fixed #KT-45287
2021-03-05 14:33:10 +01:00
Ilya Kirillov b08eb6cf4c FIR IDE: specify behaviour of HL API getOverriddenSymbols
- Split it into two functions getAllOverriddenSymbols and getDirectlyOverriddenSymbols
- Implement tests for getOverriddenSymbols
- temporary mute inheritance.kt light classes test
2021-02-19 11:49:57 +01:00
Dmitriy Novozhilov 2d5b685535 [FIR] Fix processing constructors of sealed classes
- Allow declaring protected constructors in sealed classes
- Make default visibility of sealed class constructor `protected`

KT-44861
KT-44865
2021-02-12 13:36:41 +03:00
Alexander Udalov adfa8c788c Light classes: use JVM target from the module
Using "JVM_1_8" always resulted in incorrect mapping of Kotlin
annotation targets to Java element types.

The change in AbstractKotlinRenderLogTest is needed because while
CliTraceHolder.module is technically a descriptor leak, it was never
detected by this test accidentally, because of the depth cutoff equal to
10, which started to not be enough after the minor refactoring of
replacing `Delegates.notNull` with `lateinit`.
2021-02-01 11:54:05 +01:00
Alexander Udalov d022bb0248 Switch default JVM target to 1.8
#KT-29405 Fixed
2021-02-01 11:54:04 +01:00
Denis.Zharkov 0e3aaceb16 Fix ultra light structure for @JvmRecord classes 2021-01-11 20:51:40 +03:00
Igor Yakovlev 46071c1925 [FIR IDE] LC fix annotations with special sites and nullability 2020-12-16 12:29:53 +03:00
Igor Yakovlev 535aa1e9e0 [FIR IDE] LC expand typealiases for applied annotations 2020-12-02 15:13:07 +03:00
Igor Yakovlev 3fc424246b [FIR IDE] LC basic support for type arguments
+ small fixes for deprecation, etc.
2020-12-02 15:13:06 +03:00
Igor Yakovlev 2a8f783393 [FIR IDE] HL API Better support of nullability and modality 2020-12-02 15:13:06 +03:00
Igor Yakovlev dbb54c87bc [FIR IDE] Add Fir lightclasses tests and fix FindUsages tests 2020-11-11 21:02:00 +03:00
Igor Yakovlev e08763f3dd [ULC] Add annotations for PsiTypes in UltraLight classes
WIP on KT-41148, KT-41406, KT-41420
2020-09-11 12:49:05 +03:00
Igor Yakovlev 309bf49a83 Update lightclass tests renderer
+mute invalid old light classes tests
2020-09-11 12:49:04 +03:00
Igor Yakovlev 84a582c618 Fix escaping const string literals in UL
Fixed #KT-38247
2020-05-12 17:04:16 +03:00
Igor Yakovlev ed3ae785fb Fix invalid signature for generic UL method
Fixed #KT-38348
2020-04-22 12:26:51 +03:00
Igor Yakovlev af1e3fb10d UL properties supports JvmSynthetic annotation for get: and set: modifiers
(+small refactoring)
Fixed #KT-34973
2020-03-16 18:42:17 +03:00
Igor Yakovlev 4693d595b7 Fix UL classes tests
Fixed #KT-36717
2020-02-20 18:03:10 +03:00
Igor Yakovlev 07863b61d8 Fix UL classes failing tests
UltraLightClassLoadingTestGenerated.testInferringAnonymousObjectTypes
UltraLightClassLoadingTestGenerated.testObjects
2020-02-10 23:35:47 +03:00
Igor Yakovlev ac9c106a77 Fix of UL classes muted tests
Add visibility modifier to companion field
Const initializer is now getting for const properties only

Fixed tests:
UltraLightClassLoadingTestGenerated.testAnnotations
UltraLightClassLoadingTestGenerated.testInheritance
UltraLightClassLoadingTestGenerated.testProperties
UltraLightClassSanityTestGenerated.IdeRegression.testImplementingMutableSet
UltraLightClassSanityTestGenerated.IdeRegression.testOverridingFinalInternal_extra
UltraLightClassSanityTestGenerated.IdeRegression.testOverridingInternal
UltraLightClassSanityTestGenerated.IdeRegression.testOverridingInternal_extra
UltraLightClassSanityTestGenerated.IdeRegression.testOverridingProtected_extra
UltraLightFacadeClassTestGenerated.testProperties
UltraLightClassLoadingTestGenerated.testObjects
2020-01-21 03:26:09 +03:00
Igor Yakovlev 6792d22c31 Fix minor bugs for UL methods and parameters representation
Remove INSTANCE field for local object declarations
Remove private suspend functions create from UL
Add correct extension function parameter name
Add support for setparam annotation modifier
2019-12-10 18:26:08 +03:00
Igor Yakovlev 0ff77bd3c5 Add UL support for const fields initializers
Fixed #KT-34081
2019-12-02 20:41:47 +03:00
Igor Yakovlev 8f9895e64e Add external keyword support for UL
Fixed #KT-34923
2019-11-21 22:49:23 +03:00
Igor Yakovlev cef6b71897 Fix ultraLightClass method argument types erasure
Fix IdeRegression.testImplementingMap test
2019-10-01 13:53:20 +03:00
Igor Yakovlev fc70fd05fc Enable kotlin.collections support for UL classes
Removed restriction for classes derived from Kotlin collections
Added type erasure for java collection overrided methods
2019-09-23 17:30:15 +03:00
Igor Yakovlev 79a603768a UltraLight implementation for local and anonymous declarations 2019-09-02 17:42:50 +03:00
Igor Yakovlev a9aa60491e Fix UL-classes test renders and test data 2019-07-12 16:33:51 +03:00
Igor Yakovlev 8b40005b0c UL classes flaky tests partially fix
#KT-32276 - Reduce affected tests count from 117 cases to 2 cases
2019-06-27 12:46:02 +03:00
Igor Yakovlev 545fdb5a37 Add UL-inline class overrided interface methods 2019-06-07 20:33:07 +03:00
Igor Yakovlev 7d542eda00 Fix UL classes test for inline classes support 2019-06-07 20:33:07 +03:00
Igor Yakovlev 2a1293e3ef Fix test data for UL suspend declatations
(remove should-load-cls flag)
2019-06-07 17:54:03 +03:00
Alexander Udalov f9d61f2dc7 Make inline+reified functions synthetic instead of private in bytecode
#KT-18563 Fixed
2019-05-28 16:17:49 +02:00
Denis Zharkov e0975df1c0 Create annotation arguments in ultra-light classes via PsiElementFactory 2018-12-18 09:31:13 +03:00
Denis Zharkov 859223baa2 Fix throws-list for case of kotlin.Throwable in ultra-light classes 2018-12-18 09:31:13 +03:00
Denis Zharkov b16bfad079 Do not generate no-arg constructor for sealed ultra-light class 2018-12-18 09:31:13 +03:00
Denis Zharkov 2f8b214e76 Support annotation based on descriptor in ultra-light classes
It helps to generate properly the annotations for delegates
Also note in test, that annotations in Base class have really weird
text of arguments and also don't have names
2018-12-18 09:31:13 +03:00
Denis Zharkov e88ed25f26 Support targeted annotations on property accesors in ultra-light classes 2018-12-05 16:34:44 +03:00
Denis Zharkov 52d5143dd7 Support delegating to interfaces in ultra-light classes 2018-12-05 16:34:44 +03:00
Denis Zharkov dbf9ff29a9 Support data classes in ultra-light classes 2018-12-05 16:34:44 +03:00
Denis Zharkov 28d3a62567 Separate nullability annotation processing for ultra-light classes
KtLightNullabilityAnnotation is specifically designed for old light classes
and includes a bunch of hacks that are applicable for them

So, we have to introduce own hack into it
(see org.jetbrains.kotlin.asJava.classes.KtUltraLightParameter#getTypeForNullability)
that is a bit of hard to support when extending hierarchy
2018-12-05 16:34:44 +03:00
Denis Zharkov 30c60c7b1f Do not render nullability in UltraLightChecker when it's irrelevant
It's necessary because after next changes,
they become different for ultra and old light classes.
The former (ultra) is more correct but it doesn't help when
we need to compare our implementation with reference
2018-12-05 16:34:44 +03:00