Commit Graph

12 Commits

Author SHA1 Message Date
Kirill Rakhman bed6cb7154 [FIR] Make FirFile.annotationsContainer nullable
Previously, when no file annotations were present, the FIR element
didn't have a source.
By making it nullable, it will only be created when appropriate and the
source will never be null.

#KT-55835
2023-07-20 07:29:18 +00:00
Dmitrii Gridin 09ca335b7e [FIR] CFG: drop redundant edges
Edges from class to its functions and nested classes are redundant
and lead to extra resolution work in lazy resolve mode

^KT-59600 Fixed
2023-07-04 12:07:04 +00:00
Ilya Kirillov 26e9e9de11 [LL FIR] add regression tests for KTIJ-23090
^KTIJ-23090 obsolete
2023-06-30 11:13:47 +00:00
Kirill Rakhman d7effec4e8 [LL] Set publishedApiEffectiveVisibility on deserialized declarations from stubs
#KT-58641
2023-06-21 07:34:29 +00:00
Dmitrii Gridin 87ca9e4203 [LL FIR] reduce resolution inside getOrBuildFirFor
We can avoid body resolution in some cases because it is more
than out contract is required

So ANNOTATIONS_ARGUMENTS_MAPPING should be enough for all
non-body parts of a declaration to return fully-resolved FirElement
Body parts incudes: body and default values

^KT-59266 Fixed
2023-06-16 14:47:49 +00:00
Dmitrii Gridin aad99fd6eb [LL FIR] getOrBuildFir tests should render fir file
We need it to see how many declarations were resolved

^KT-59266
2023-06-16 14:47:48 +00:00
Anna Kozlova dd059a1e63 [LL] find fir by psi: allow fallthrough to traverse tree for invalid code
In case of broken code e.g., duplicated classes provider would return first class,
though we definitely need some code insight in this case
at least to add navigation fixes, etc.
Similar to this, a file copy is created during completion,
where additional elements might appear and we need to search for them.

Added test cases for duplicated classes.
2023-06-15 17:32:40 +00:00
Egor Kulikov 9a77632f1c [FIR] Fix invalid expression throwing exception when determining type
^KTIJ-25421 fixed

Merge-request: KT-MR-10317
Merged-by: Egor Kulikov <Egor.Kulikov@jetbrains.com>
2023-05-25 12:31:42 +00:00
Dmitrii Gridin 03eab387c0 [FIR] FirRenderer: render annotation resolve phase as well
^KT-56543
2023-04-06 08:09:41 +00:00
Anna Kozlova e54627b309 [FIR] add missed diagnostics for incomplete code
^KT-55053
2023-01-27 18:36:36 +00:00
Anna Kozlova 15b1e429d7 [compiler] introduce dedicated Fir declaration for dangling modifier lists (KTIJ-23008)
ensure fir annotations are included in FirDanglingModifierList and resolved,
dedicated DanglingTopLevelModifierListStructureElement exists for top
level lists only, class level lists are processed by containing structure
element
2022-12-21 20:58:46 +00:00
Anna Kozlova 3fdd0aacd3 [compiler] preserve fir receiver in tree
when selector is invalid expression,
ensure that fir tree still contains receiver as well as selector

KTIJ-23578
2022-11-22 10:46:59 +00:00