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
Marco Pennekamp
c5e5140c08
[Analysis API] Fix exceptions around type parameters being treated as callables
...
- `toResolvedCallableSymbol`: cast defensively because
the resolved symbol might not be a callable symbol.
- `toKtCallInfo`: Check that the resolved symbol is actually callable.
^KTIJ-23003 fixed
2022-11-17 18:58:38 +00:00
Dmitrii Gridin
86422d0944
[FIR] FirReceiverParameter: rename type to typeRef
...
^KT-54417
2022-11-17 09:50:17 +00:00
Dmitrii Gridin
40c64c672d
[FIR] FirRenderer: render receiver annotation
...
^KT-54417
2022-11-17 09:50:16 +00:00
Dmitrii Gridin
ef5a3303b2
[FIR] FirBasedSymbol: add internal annotation for internal things
...
^KT-54417
2022-11-17 09:50:15 +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
37d688ae83
[AA] introduce FirReceiverParameter
...
^KT-54417
2022-11-17 09:50:09 +00:00
Dmitrii Gridin
be7d282974
[FIR] introduce FirReceiverParameter
...
^KT-54417
2022-11-17 09:50:09 +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
267ce1d892
[FIR] KT-54220: Don't crash on unsigned integers when no stdlib present
...
^KT-54220 Fixed
2022-11-15 09:02:33 +02:00
Nikolay Lunyak
e34dd49872
[FIR] Get rid of the argumentMapping function.
...
It's just a duplicate of `resolvedArgumentMapping`. Plus there is a
member with the same name inside `FirAnnotationCall`.
2022-11-14 22:40:41 +02: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
Anna Kozlova
9f470e2a4d
[LL API] return FirErrorProperty for top level destructuring declaration
...
KTIJ-23552
2022-11-11 17:39:54 +01:00
Mikhail Glukhikh
4dc7b6dddc
K2: fix/universalize logic to determine that member is from Java
2022-11-11 13:30:40 +00:00
Mikhail Glukhikh
cb39221f85
FIR2IR: drop unused code with annotation placeholder
2022-11-11 13:30:37 +00:00
Mikhail Glukhikh
cc1a094b6c
K2: rename importedFromObject -> importedFromObjectOrStatic
2022-11-11 13:30:34 +00:00
Mikhail Glukhikh
53f37a3893
FIR: always use class-based dispatch receiver type in class member helpers
2022-11-11 13:30:33 +00:00
Mikhail Glukhikh
d4fc2248ff
FIR: make class member helper names more consistent
2022-11-11 13:30:32 +00:00
pyos
e2a83a0ed0
FIR: unwrap intersection overrides when looking for owner class
...
But not substitution overrides! This is important if the method called
is an intersection override where one of the intersected types is a
subtype of a generic type.
2022-11-11 13:30:32 +00:00
Ilya Kirillov
068168bc3c
[fir] change setter parameter name to value
2022-11-11 11:59:56 +01:00
Bogdan Mukvich
fce8b877c8
Remove unused WriteCopyrightToFile gradle task
...
#KTI-758
2022-11-07 08:24:19 +00:00
Nikolay Lunyak
c4fa1ed9d8
[FIR] Prevent StackOverflowError in FirTypeParameterSymbol
2022-10-20 13:08:11 +00:00
Dmitriy Novozhilov
8fbb605034
[FIR] Rename containingClass function to containingClassLookupTag
...
Since this function returns lookup tag instead of FirClass or symbol
the old name may lead to misunderstanding
2022-10-19 11:09:34 +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
Mikhail Glukhikh
62ba1277bb
K2: don't duplicate custom annotations in types #KT-54275 Fixed
2022-10-10 06:20:39 +00:00
Dmitriy Novozhilov
ee21c966e1
[FIR] Get rid of all usages of safeAs in FIR modules
2022-10-06 06:57:06 +00:00
Ilya Kirillov
49f2f85927
[Low Level FIR] fix exception when creating symbol by invalid code
2022-10-04 12:56:07 +00:00
Dmitriy Novozhilov
c0ad67c4f9
[FIR] Generate java declarations for record components of java records
...
^KT-53964 Fixed
2022-10-03 15:48:17 +03:00
Ilya Kirillov
dd9ed02fbd
[FIR] fix memory leak via static ConeIntegerLiteralTypeImpl.COMPARABLE_TAG
2022-10-02 20:38:34 +00:00
Mikhail Glukhikh
8281c166b1
K2 checkers: extract retrieveDirectOverriddenOf to FirTypeScope.kt
2022-09-29 08:34:11 +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
519f6aeff1
[FIR] Make source in qualifier parts nullable
...
This is needed to be able to create no-source user type refs from plugins
2022-09-26 10:09:08 +00:00
Dmitriy Novozhilov
671083c701
[Serialization] Implement serialization checker for K2 version of plugin
...
^KT-53178 Fixed
2022-09-07 07:57:38 +00:00
Dmitriy Novozhilov
e1fd184d14
[FIR] Fix missing initialization of backingField for properties from primary constructor
2022-09-07 07:57:37 +00:00
Dmitriy Novozhilov
194741b96b
[FIR] Remove incorrect FirClassSymbol<*>.superConeTypes utility
...
Replace all usages with member `FirClassSymbol.resolvedSuperTypes`
2022-09-07 07:57:37 +00:00
Nikolay Lunyak
3d9c77efa8
[FIR] Add DNN checks
...
Merge-request: KT-MR-7000
Merged-by: Nikolay Lunyak <lunyak.kolya@mail.ru >
2022-09-01 14:25:07 +00:00
Dmitriy Novozhilov
7ef2f7ccde
[FIR] Add transformContextReceivers() method to FirProperty
2022-08-24 15:36:41 +00:00
Jinseong Jeon
25f7554a31
AA FIR: constant evaluation for Java field
2022-08-20 00:50:09 +02:00
Arseniy Terekhov
a80870bc8f
[FIR] DeprecationsProvider: caching results
2022-08-19 07:37:54 +00:00
Arseniy Terekhov
25fc948d95
[FIR] DeprecationsProvider: make evaluation of deprecations on demand
2022-08-19 07:37:54 +00:00
Leonid Startsev
6893e210fb
[K2] Remove typeWithStarProjections in favor of constructStarProjectedType
2022-08-17 11:43:40 +00:00
Leonid Startsev
6f6342dafc
Prototype of kotlinx.serialization FIR plugin:
...
Implement basic non-parameterized case
2022-08-17 11:43:33 +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
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
Vsevolod Tolstopyatov
93f17a2b86
[FIR] Support static getters along with fake Enum.entries declaration in FIR
...
#KT-48872
2022-08-12 09:35:18 +00:00
Ilya Kirillov
da9cf1468c
[FIR] add KDoc to lazy resolution functions
2022-08-10 22:49:19 +02:00
Ilya Kirillov
0748f28efe
[FIR] rename ensureResolve -> lazyResolveToPhase as it better describes function semantics
2022-08-10 22:49:18 +02:00