Commit Graph

35 Commits

Author SHA1 Message Date
Ilya Kirillov 69c024a5ce [FIR] optimize deprecation calculation for symbols
All symbols except member callables can be deprecated if they have non-empty annotation list

^KT-56800 fixed
2023-02-24 16:10:57 +01:00
Egor Kulikov 6bb71b44f6 [FIR] Use lazy constructor delegate even if there's no KtConstructor
Twelfth step for ^KT-52615

Merge-request: KT-MR-8895
Merged-by: Egor Kulikov <Egor.Kulikov@jetbrains.com>
2023-02-20 10:50:09 +00:00
Kirill Rakhman 1eb18f13bd FIR: Fix test data after making LHS of assignment an expression
KT-54648
2023-01-31 08:39:43 +00:00
Yan Zhulanow 699f96284a [FE] Add missing 'lazyResolveToPhase()' before recursive bound check
^KTIJ-24087 Fixed
2023-01-30 11:09:42 +00:00
Yan Zhulanow f1edbc1a14 [LL API] Add tests for 'out of content root' analysis mode 2023-01-25 08:04:36 +00:00
Egor Kulikov 195ecad004 [FIR] Make annotations arguments lazy in RawFirBuilder
Sixth step for ^KT-52615
2023-01-24 16:02:53 +00:00
Ilya Kirillov 1bbcae5ed2 [FIR] fix resolve contract violation from scopes
We cannot call lazy resolve to STATUS phase from scopes as scopes may be accessed on a STATUS phase or earlier

^KT-54890
^KTIJ-23587 fixed
2023-01-13 21:32:51 +00:00
Mikhail Glukhikh b271b409c7 Fix final -> open modality in new test data after 2022-12-14 23:19:37 +01:00
Steven Schäfer 6af616d3c3 FIR: make declarations marked with 'override' implicitly open
#KT-52236 Fixed
2022-12-14 21:46:41 +00:00
Ilya Kirillov cd83fec078 [LL FIR] fix lazy resolve of status for the members of the nested class
^KTIJ-23932 fixed
2022-12-13 13:16:32 +00:00
Mikhail Glukhikh df5aa59185 K2: Don't use FirTypeParameterSymbol.resolvedBounds() from inference 2022-12-12 16:21:05 +00:00
Ilya Kirillov 5477e2073f [Analysis API] fix typo in testdata filenames 2022-12-05 17:27:43 +01:00
Ilya Kirillov c899f6dae3 [LL FIR] fix lazy resolution of member property statuses for anonymous objects
Previously, statuses of superclass which are not local was not ignored

Sometimes it worked in the IDE by calling lazyResolveToPhase
which is a violation of the lazy resolution contract

^KT-54890
2022-12-05 17:27:42 +01:00
Yan Zhulanow bcf1389ae5 [LL API] Fix enum value lazy analysis (KTIJ-23833)
^KTIJ-23833 Fixed
2022-12-05 11:44:15 +00:00
Egor Kulikov fb2485f83c [FIR] Make constructor delegate lazy in RawFirBuilder
Fifth step for ^KT-52615

Merge-request: KT-MR-7860
Merged-by: Egor Kulikov <Egor.Kulikov@jetbrains.com>
2022-12-02 03:12:51 +00:00
Ilya Kirillov 8dab560d6e [LL FIR] fix status resolution of static enum members
Before, BODY_RESOLVE phase were used for them but status may be unresolved.
This caused CCE on accessing resolved status for such static enum members.

Now, those declarations are created with the status of owning enum as the status is taken from that class.
2022-11-16 19:44:18 +00:00
Nikolay Lunyak 89f8821d0a [FIR] KT-53371, KT-53519: Fix annotations arguments mapping
See: compiler/testData/asJava/lightClasses/
AnnotatedParameterInInnerClassConstructor.kt

The muted tests don't work with the (KT-53371, KT-53519)-related
changes. During this test happens an attempt to access unresolved
annotations via CustomAnnotationTypeAttribute.
Discussion: KTIJ-23547
2022-11-14 22:40:41 +02:00
Ilya Kirillov 49f2f85927 [Low Level FIR] fix exception when creating symbol by invalid code 2022-10-04 12:56:07 +00:00
Roman Golyshev 16cb3064c8 [FIR] Resolve value class constructor to TYPES before using its params
Right now it is the easiest way to ensure that all the parameters are
resolved. After KT-53573 is fixed, we might use `resolvedReturnTypeRef`
on each parameter individually instead

Also, add `toString` implementation to `ValueClassRepresentation`
classes, so they are properly rendered in testdata

^KTIJ-22630 Fixed
2022-08-30 13:49:40 +00:00
Vsevolod Tolstopyatov 22e26d0756 Move EnumEntries LVS to 1.9
* Also cleanup tests to avoid using obsolete WITH_RUNTIME
2022-08-12 09:35:32 +00:00
Mikhail Glukhikh 7333589663 K1/K2: add Enum.entries unconditionally and filter them out in tower
Before this commit, we added Enum.entries only in case when
LanguageFeature.EnumEntries was ON (with an exception in K1/Java case).
In this commit we add Enum.entries unconditionally, and in case
the language feature is OFF we filter them out during tower resolve.
2022-08-12 09:35:27 +00:00
Ilya Kirillov e7e9c24473 [LL FIR] update lazy resolve testdata after changes in phases 2022-08-10 22:49:18 +02:00
Ilya Kirillov 72da40f97c [LL FIR] update phase of type parameters on lazy resolve 2022-08-10 22:49:14 +02:00
Ilya Kirillov 0f6f901179 [LL FIR] render type parameters resolve phase in tests 2022-08-10 22:49:13 +02:00
Ilya Kirillov cd063d0cd0 [LL FIR] update phase of value parameters on lazy resolve
Previously, such phases may not be properly set which could cause additional lazy resolve
2022-08-10 22:49:13 +02:00
Mikhail Glukhikh 7ce5100946 FirRenderer: slightly change/refactor declaration rendering 2022-07-14 09:38:45 +00:00
Roman Golyshev 8fca9f41eb [FIR IDE] Correctly check declarations' modalities in SamResolver
Modality might be null before the declaration itself is resolved to
`STATUS`

^KT-52667 Fixed
2022-06-07 21:14:24 +00:00
Roman Golyshev 166c771e1b [FIR IDE] Ensure resolve to CONTRACTS phase in ReturnTypeCalculator
If we want to analyse some function's call, we need to know about its
contracts, otherwise resolving the following code would be broken.
Computing return type of function is a prerequisite to using it in any
sensible way, so it's the best place to resolve it to CONTRACTS

KT-50733
2022-06-06 09:14:37 +00:00
Dmitriy Novozhilov 9d4d55b3ce [LL API] Extract expect actual matching into separate phase 2022-05-20 13:33:04 +00:00
Mikhail Glukhikh f073e86c93 Update FIR Analysis API test data 2022-03-10 20:42:42 +00:00
Ilya Kirillov c7729689c4 LL API: always create FirFile with lazy bodies 2022-01-21 16:46:38 +01:00
Ilya Kirillov 75ae37fcbf LL API: remove unused resolve api 2022-01-21 16:46:36 +01:00
Roman Golyshev 3148913e60 Fix test data
It is a follow-up commit for 9b3add0130,
where `CorrespondingProperty` property was added
2021-10-25 21:15:37 +03:00
Ivan Kochurkin 75b40e4b75 [FIR] Add INVISIBLE_SETTER 2021-10-03 17:10:06 +03:00
Ilya Kirillov 989f3248e4 FIR IDE: move low level api testdata sources to the analysis directory 2021-09-15 11:32:28 +02:00