Commit Graph

57 Commits

Author SHA1 Message Date
Roman Efremov cbb20ce2b8 Don't generate getEntries method in light classes when feature disabled
^KTIJ-23530 Fixed
2022-12-27 14:41:53 +00:00
Dmitrii Gridin c77401d823 [SLC] drop redundant 'final' modifier from synthetic enum members
^KT-55502 Fixed
2022-12-20 19:52:14 +00:00
Dmitrii Gridin bb51d62e0a [SLC] support static properties (e.g. Enum.entries)
^KT-55496
^KTIJ-23530
2022-12-20 19:52:13 +00:00
Dmitrii Gridin e39dc9b768 [LC] fix signature of 'Enum.valueOf()'
* drop @NotNull annotation from parameter
* add NullPointerException to throws

^KT-55497 Fixed
2022-12-20 19:52:12 +00:00
Dmitrii Gridin 7d0c093da7 [SLC] generate static enum methods from symbols
^KT-55496 Fixed
2022-12-20 19:52:11 +00:00
Steven Schäfer 6af616d3c3 FIR: make declarations marked with 'override' implicitly open
#KT-52236 Fixed
2022-12-14 21:46:41 +00:00
Dmitrii Gridin 7bfa900ce6 [SLC] fix modality for methods and property accessors
^KTIJ-23783
2022-12-06 13:40:46 +00:00
Jinseong Jeon f2bc25c71d SLC: fix visibility/static modifer of property in companion 2022-11-21 15:55:13 +01:00
Yan Zhulanow e21226d02a [SLC] Ignore callables with invalid or absent names (KTIJ-23584) 2022-11-15 16:13:59 +00:00
Jinseong Jeon 8d8d0d9922 SLC: add marker interface for collection inheritor 2022-10-27 14:41:24 +02:00
Jinseong Jeon fc1eb02590 SLC: implement PsiVariable#computeConstantValue for light field 2022-10-02 13:41:12 +02:00
Dmitriy Novozhilov c5916e1d1f [AA LC] Fix computation of const initializers of fields 2022-09-15 17:27:23 +03:00
Dmitriy Novozhilov c67ded2d3b [AA LC] Properly set type mapping mode for bounds of type parameters 2022-09-15 17:27:22 +03:00
Dmitriy Novozhilov ab2aa3117b [AA LC] Add @java.lang.Override on override functions 2022-09-15 17:27:21 +03:00
Dmitry Gridin dd824aacb6 Revert "Revert "[light classes] drop old light classes and backend: iteration #2""
This reverts commit 43b4df74bc.
2022-06-28 17:57:30 +02:00
Dmitry Gridin 43b4df74bc Revert "[light classes] drop old light classes and backend: iteration #2"
This reverts commit 97ce502cbe.
2022-06-28 13:52:10 +02:00
Dmitry Gridin 97ce502cbe [light classes] drop old light classes and backend: iteration #2
drop javaFileStub and fix tests

^KT-48773
2022-06-28 11:44:39 +00:00
Dmitry Gridin f42528e354 [light classes] support DefaultImpls in ulc
^KT-48773
2022-06-14 17:18:09 +00:00
Jinseong Jeon 63fb00fa21 FIR LC: revisit when to add fields to companion and/or containing class 2022-05-24 20:32:55 +02:00
Jinseong Jeon 89d1a6bc0f FIR LC: populate fields from companion in interface 2022-05-24 20:32:55 +02:00
Yan Zhulanow fa4dadf9b7 Update KotlinClassInnerStuffCache implementation
'KotlinClassInnerStuffCache' was copy-pasted from the platform's
'ClassInnerStuffCache' several years ago. After J2K and other changes,
it became quite dirty.

Besides cleaning things up, enum synthetic method handling have
significantly improved. Before, such methods were handled only in
'processDeclarationsInEnum', and 'getMethods()' didn't return them.
This led to inconsistent behavior and was reason for providing special
ad-hoc support in '1b6ded600518176b21cc308ed3e032ef8d04cc90'.
2022-03-14 17:53:55 +09:00
Yan Zhulanow f237631f05 Revert "FIR/LC: create synthetic members of enum class"
This reverts commit 1b6ded60
2022-03-14 17:53:55 +09:00
Jinseong Jeon 1b6ded6005 FIR/LC: create synthetic members of enum class
^KTIJ-17414 In Progress
^KTIJ-17444 In Progress
2022-02-24 17:51:50 +01:00
Ilya Kirillov 62c9a7888b Analysis: remove // FIR_COMPARISON form LC testdata as LC tests are moved from IJ 2021-12-27 16:23:21 +03:00
Ilya Kirillov 02f9f116b2 Analysis: ignore failing LC test 2021-12-27 16:23:20 +03:00
Ilya Kirillov db31e0292c Analysis: add LC testdata with current behaviour 2021-12-27 16:23:20 +03:00
Ivan Kylchik c7435ba760 Replace all occurrences of WITH_RUNTIME with WITH_STDLIB
We are going to deprecate `WITH_RUNTIME` directive. The main reason
behind this change is that `WITH_STDLIB` directive better describes
its meaning, specifically it will add kotlin stdlib to test's classpath.
2021-11-17 15:26:38 +03: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
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
Dmitry Gridin 724194dec0 [ULC] fix testData in the plugin (related to repeatable annotation) 2021-09-08 19:50:40 +07:00
Igor Yakovlev e4870740e1 [LC] Fixed light classes nullability for Kotlin 1.5
Fixed #KT-44472
2021-04-20 15:21:12 +02:00
Mikhail Glukhikh 107a825c5f Make FileDescriptorForVisibilityCheck subtype of PackageFragmentDescriptor
#KT-20548 Fixed
2020-12-23 00:11:08 +03:00
Igor Yakovlev f282b721bc [FIR IDE] LC Fix test data 2020-12-16 12:29:53 +03:00
Igor Yakovlev 56c3faee00 [FIR IDE] LC Fix generating unique field names 2020-12-02 15:13:08 +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 309bf49a83 Update lightclass tests renderer
+mute invalid old light classes tests
2020-09-11 12:49:04 +03:00
Dmitry Petrov 2e31f95554 Update testData 2020-07-20 20:04:32 +03:00
Dmitry Petrov 3f266aafb4 JVM: no nullability annotations on private and synthetic fields 2020-06-25 22:31:12 +03:00
Dmitry Petrov e9231b5624 JVM: Generate object and companion object INSTANCE fields as @NotNull 2020-06-22 16:28:00 +03:00
Mikhael Bogdanov ae9a91e17d Switch 'AbstractCompilerLightClassTest' to new scheme with configuration kind 2020-03-04 14:51:19 +01:00
Denis Zharkov 5ec93f2718 Avoid assertion in bridges-generation for light classes
^KT-11656
2019-01-14 14:54:18 +03:00
Dmitry Petrov 9dc2ad664d Fix ConstantValue-related testData for lightClasses tests
TODO support custom language version settings for lightClasses tests
2018-07-24 10:52:16 +03:00
Nicolay Mitropolsky aed63d49ce WrongAnnotations.kt - disabled LAZINESS:Consistency -check
because source-based LightAnnotations produces annotation values from arguments in sources even when they are invalid as parameters. Thus they could be inconsistenct with "compiled" ones and it is not an error.
2018-05-28 17:06:35 +03:00
Nikolay Krasko 062a212b61 Don't build light classes for local classes with parse errors (KT-24323, EA-107235)
Also use checks for building light classes in `getLightClassDataHolder`.
2018-05-16 12:55:09 +03:00
Nikolay Krasko 15a704fe36 Use comment directive for not generated case to be valid Java file 2018-05-16 12:55:08 +03:00
Mikaël Peltier d0ed0c4049 KT-14258 Optimize accesses to properties defined into companion
- Use direct access to property defined into companion object when
it is possible rather than always use an accessor to access the
property.
- Use direct access will speedup runtime performance.
- Avoid to generate useless accessors for companion properties.

Fix of https://youtrack.jetbrains.com/issue/KT-14258
2018-03-14 15:30:40 +01:00
Pavel V. Talanov 498431311c Light classes: test "JvmPackageName" and actual declarations 2018-03-06 12:06:59 +01:00
Pavel V. Talanov 89c82a85d0 Do not build light classes for expect classes
#KT-15482 Fixed
2018-03-05 18:07:36 +01:00
Pavel V. Talanov 9e061d3bbb Fix light class exception on empty multifile facade
Fix generating multifile facade with all members private (in bytecode)
leading to delegate not being generated for corresponding light class

 #KT-20966 Fixed
2017-11-03 16:44:53 +03:00