Yan Zhulanow
d652dc620c
[FE] Preserve legacy contract description calls in bodies
...
^KT-55231 Fixed
^KTIJ-21012 Fixed
2022-12-26 11:46:58 +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
Ilya Chernikov
a89dfdce03
K2 Scripting: add support for script args to FIR part
2022-12-21 14:34:20 +00:00
Mikhail Glukhikh
f33f87e3d4
K2: drop unused qualifier in FirJavaTypeRef
2022-12-20 11:04:27 +00:00
Mikhail Glukhikh
e9fbeb9be2
K2: use MutableOrEmptyList for context receivers on declaration site
2022-12-20 11:04:27 +00:00
Mikhail Glukhikh
d20d63786b
K2: use MutableOrEmptyList for type arguments
2022-12-20 11:04:26 +00:00
Mikhail Glukhikh
a48610000d
K2: introduce & use MutableOrEmptyList.EMPTY singleton
2022-12-20 11:04:26 +00:00
Mikhail Glukhikh
ddc786364f
K2: use MutableOrEmptyList for context receivers
2022-12-20 11:04:26 +00:00
Mikhail Glukhikh
dff71a9602
K2: use MutableOrEmptyList for nonFatalDiagnostics
2022-12-20 11:04:25 +00:00
Mikhail Glukhikh
582b640bec
K2: use MutableOrEmptyList for annotations storage in FIR elements
2022-12-20 11:04:25 +00:00
Mikhail Glukhikh
be5394e211
Fix minor formatting issue in generated FIR tree
2022-12-20 11:04:24 +00:00
Dmitriy Novozhilov
d75160250d
[FIR] Drop transformExtensionReceiver and transformDispatchReceiver from FirQualifiedAccess
...
After removal of `StoreReceiver` transformers those methods are not used
anymore, so it's ok to remove them at all
2022-12-20 08:12:10 +00:00
Dmitriy Novozhilov
9ccbf8639d
[FIR] Add dispatchReceiverType to FirAnonymousInitializer
...
This is needed to add ability to quickly find class to which initializer
belongs
2022-12-20 08:12:09 +00:00
Dmitriy Novozhilov
d45ae59d33
[FIR] Add methods to replace dispatch and extension receivers
2022-12-20 08:12:07 +00:00
Dmitriy Novozhilov
4bddb27ca3
[FIR] Get rid of candidateSymbol in FirNamedReference
...
`candidateSymbol` has any reasonable meaning only for references with
not completed candidate, so this property is moved from FirNamedReference
to new node FirNamedReferenceWithCandidateSymbol, which has real
implementation only in :resolve module (`FirNamedReferenceWithCandidate`)
2022-12-20 08:12:07 +00:00
Dmitriy Novozhilov
9e4e5eed68
[FIR] Introduce FirResolvedErrorReference node
2022-12-15 12:12:19 +00:00
Ilya Kirillov
b962fcddc8
[FIR] move file annotations to the FirFileAnnotationsContainer
2022-12-09 16:21:07 +00:00
Ilya Kirillov
67adc3fb1a
[FIR] introduce FirFileAnnotationsContainer
2022-12-09 16:21:07 +00:00
Ilya Kirillov
8fd892176a
[FIR] introduce FirElementWithResolvePhase class and make it a base class for FirDeclaration
2022-12-09 16:21:06 +00:00
Egor Kulikov
dbfe33c00d
[FIR] Make default values for value parameters lazy in RawFirBuilder
...
Sixth step for ^KT-52615
Merge-request: KT-MR-7926
Merged-by: Egor Kulikov <Egor.Kulikov@jetbrains.com >
2022-12-08 13:32:37 +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
Dmitriy Novozhilov
6864433581
[FIR] Support resolution of meta-annotations before supertypes
...
Now annotations are resolved with following algorithm:
1. On COMPILER_REQUIRED_ANNOTATIONS we resolve all annotations
and store results if this is compiler annotation, plugin annotation,
or annotation with meta-annotation (meta annotations are checked
recursively with designated resolution if needed)
2. On TYPES stage we resolve all those annotations once again and if
some annotation changes resolution then we keep type from p.1 and
report error on this annotation, so user should disambiguate it
Ambiguity may occur because of nested annotations with same name as
plugin annotations:
```
annotation class SomeAnnotation // (1) plugin annotation
open class Base {
annotation class SomeAnnotation // (2)
}
class Derived : Base() {
@SomeAnnotation // <-----------------
class Inner
}
```
At COMPILER_REQUIRED_ANNOTATIONS annotation call will be resolved to (1)
because at this stage supertypes are not resolved yet, and we consider
only importing scopes. At the TYPES stage we will find correct
annotation from supertype
2022-12-01 07:29:39 +00:00
Ilya Chernikov
a3a1550933
K2 scripting: add initial scripting support to K2 frontend
2022-11-26 18:01:48 +00:00
Egor Kulikov
d585f068dd
[FIR] Make anonymous initializer lazy in RawFirBuilder
...
Fourth step for KT-52615
Merge-request: KT-MR-7798
Merged-by: Egor Kulikov <Egor.Kulikov@jetbrains.com >
2022-11-25 11:41:44 +00:00
Ilya Kirillov
7781ad67d4
[FIR] introduce FirValueParameter.containingFunctionSymbol
...
^KT-55034 fixed
2022-11-22 18:25:30 +01:00
Ilya Kirillov
c8e3103af9
[FIR] do not create FirParameter for catch parameter
...
use FirProperty instead
^KT-55034
2022-11-22 18:25:30 +01:00
Egor Kulikov
067036c162
RawFirBuilder refactoring
...
Second step for KT-52615
Get rid of PsiHandlingMode
Get rid of source in FirLazyBlock
Refactor lazy creation
Merge-request: KT-MR-7753
Merged-by: Egor Kulikov <Egor.Kulikov@jetbrains.com >
2022-11-22 14:43:53 +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
Ilya Kirillov
b6481ed891
[FIR] do not use FirValueParameter for function type parameter
...
As it is a different abstraction, introduced FirFunctionTypeParameter instead
Also, fix syntax checkers for function type parameter
^KT-55035 fixed
2022-11-21 16:17:51 +00:00
Dmitrii Gridin
86422d0944
[FIR] FirReceiverParameter: rename type to typeRef
...
^KT-54417
2022-11-17 09:50:17 +00:00
Dmitrii Gridin
3cd85a4622
[FIR] drop redundant receiver copy
...
^KT-54417
2022-11-17 09:50:15 +00:00
Dmitrii Gridin
b40d329751
[FIR] FirAnnotationBuilder: drop redundant buildAnnotationCopy
...
^KT-54417
2022-11-17 09:50:13 +00:00
Dmitrii Gridin
be7d282974
[FIR] introduce FirReceiverParameter
...
^KT-54417
2022-11-17 09:50:09 +00:00
Bogdan Mukvich
fce8b877c8
Remove unused WriteCopyrightToFile gradle task
...
#KTI-758
2022-11-07 08:24:19 +00:00
Dmitrii Gridin
a0b814a1b6
[FIR] make FirPropertyAccessor#propertySymbol non-nullable
...
we need it to restore property accessor by property
^KT-54311
2022-10-17 14:59:42 +00:00
Ilya Kirillov
49f2f85927
[Low Level FIR] fix exception when creating symbol by invalid code
2022-10-04 12:56:07 +00:00
Nikolay Lunyak
f578381726
[FIR] KT-46483: Forbid annotations in where Clauses
...
Merge-request: KT-MR-7208
Merged-by: Nikolay Lunyak <lunyak.kolya@mail.ru >
2022-09-28 13:38:18 +00:00
Dmitriy Novozhilov
7ef2f7ccde
[FIR] Add transformContextReceivers() method to FirProperty
2022-08-24 15:36:41 +00:00
Arseniy Terekhov
25fc948d95
[FIR] DeprecationsProvider: make evaluation of deprecations on demand
2022-08-19 07:37:54 +00:00
Simon Ogorodnik
513af2dfbc
FIR. Refactor smart-cast representation in FIR tree
...
Make smart-casts non-transparent expression without delegation
to underlying FirQualifiedAccessExpression, as children delegation in
fir tree has unclear semantics
Remove two different kinds of tree nodes for smart-casts
2022-08-15 21:46:11 +00:00
Dmitriy Novozhilov
80223bd555
[FIR] Fix determination of which type is FIR type in tree generator
...
^KT-52832 Fixed
2022-06-21 14:10:36 +00:00
Ivan Kochurkin
fd2b4fd497
[FIR] Fix false positive USELESS_CAST on stub types, ^KT-50293 Fixed
2022-06-17 23:26:18 +00:00
Ivan Kochurkin
9d6f88469a
[FIR] Use @file:Suppress("DuplicatedCode") for generated fir impl nodes
...
Get rid of unwanted warnings in IntelliJ
2022-06-17 23:26:17 +00:00
mcpiroman
c11d01bebb
Extract some common source generator logic from FIR tree generator
2022-06-13 18:58:05 +02:00
Dmitriy Novozhilov
ae0bc1c078
[FIR] Generate copy builder for FirTypeParameter
2022-06-07 14:12:24 +00:00
Nikolay Lunyak
611691ec70
[FIR JS] Support smart casts for dynamic
2022-06-02 13:47:25 +00:00
Ivan Kochurkin
ad7c213ab2
[FIR] Initialize type for annotation arguments during deserialization
...
Get rid of IrErrorTypeImpl creating in FIR2IR
2022-05-29 23:41:23 +03:00
Denis.Zharkov
b87412c5af
FIR2IR: Fix substitution work for context receivers
2022-05-13 18:04:02 +00:00
Denis.Zharkov
299c02a822
FIR: Introduce FirContextReceiverArgumentListOwner
...
Add it as a supertype for FirQualifiedAccess and FirDelegatedConstructorCall
^KT-51889 Related
2022-05-13 18:04:01 +00:00
Ivan Kochurkin
8c7fad9a5e
[FIR] Support of type arguments in annotations ^KT-48444 Fixed
2022-04-18 15:36:19 +00:00