Dmitriy Novozhilov
4490f64666
[FIR] Get rid of FirAnnotatedDeclaration
...
Now all fir declarations have annotations
^KT-49260 Fixed
2021-10-28 15:01:18 +03:00
Ilya Chernikov
da2d3f29da
Add multiple renderer sources support to new diagnostics infrastructure
2021-10-27 22:17:41 +02:00
Ilya Chernikov
9e60c70db7
Add abstract source element and switch diagnostics to it
2021-10-27 22:17:40 +02:00
Ilya Chernikov
e9f59e8d1d
Move common diagnostics infrastructure to frontend.common
2021-10-27 22:17:39 +02:00
Ilya Chernikov
f1d0ead652
Fix fir analysis api after refactorings
2021-10-27 22:17:39 +02:00
Ilya Chernikov
31c58767cf
Rearrange fir diagnostic for further reuse
2021-10-27 22:17:39 +02:00
Ilya Chernikov
a65beb2dc5
Move Fir*SourceElement to frontend.common, rename to Kt* (complete)
2021-10-27 21:44:11 +02:00
Mikhail Glukhikh
8bd0b237b7
Convert EXPOSED_PROPERTY_TYPE_IN_CONSTRUCTOR into deprecation error
...
#KT-28078 Fixed
2021-10-27 19:43:01 +03:00
Jinseong Jeon
3f2c86afb8
FIR IDE/LC: introduce/use delegated member scope
2021-10-27 17:06:32 +02:00
Jinseong Jeon
700f8ac287
FIR IDE: relocate scope-related test data
2021-10-27 17:06:32 +02:00
Jinseong Jeon
4266ffa274
FIR IDE: fix typo in test directory (overridden)
2021-10-27 17:06:32 +02:00
Jinseong Jeon
b52912162f
FIR IDE: API to indicate delegated property
2021-10-27 17:06:30 +02:00
Dmitriy Novozhilov
f26059a7d3
[FE] Add clear warning about future changes about nullability of safe call with non nullable receiver
...
^KT-46860
2021-10-27 16:28:37 +03:00
Roman Golyshev
8e911b1e98
[FIR IDE] Add fast path to isImplicitFunctionCall and improve its kdoc
2021-10-26 16:48:00 +03:00
Tianyu Geng
e195f0426e
FIR IDE: add KtExtensionReceiverSymbol
...
This symbol represents the extension receiver of a callable and
currently is used as the resolution target of `this` in a callable with
extension.
2021-10-26 08:50:38 +00:00
Tianyu Geng
d3c91ee9be
FIR IDE: align resolution behavior of super with FE1.0
...
That is, for a labeled `super`, the keyword should resolve to the super
type and the label should be resolved to the current type.
2021-10-26 08:50:37 +00:00
Tianyu Geng
0d966ec65a
FIR IDE: resolve implicit invoke to callable property
2021-10-26 08:50:37 +00:00
Tianyu Geng
6a59dc7fa5
FIR: add bfs helper and use it
...
It's also used in Kotlin quickfixes in intellij repo
2021-10-26 00:42:09 +02:00
Ilya Kirillov
a11cd74b28
Revert "FIR: add bfs helper and use it"
...
This reverts commit dbb0496d23 .
2021-10-26 00:37:31 +02:00
Tianyu Geng
dbb0496d23
FIR: add bfs helper and use it
...
It's also used in Kotlin quickfixes in intellij repo
2021-10-26 00:06:00 +02:00
Jinseong Jeon
9524825662
FIR LC: approximate local type only if it's necessary and out of scope
2021-10-25 20:24:48 +03:00
Jinseong Jeon
9ed2c9d371
FIR LC: add tests about type approximation in PsiType provider
2021-10-25 20:24:48 +03:00
Tianyu Geng
7fb82232cd
FIR IDE: use correspondingProperty in ref shortener
2021-10-25 18:16:32 +03:00
Tianyu Geng
112f365414
FIR IDE: fix ref shortener on property in primary constructor
...
Currently the shortener ignores the created FirProperty, as a result,
any annotations declared on the getter or setter are ignored. The test
is added in Intellij repo.
2021-10-25 18:16:31 +03:00
Tianyu Geng
363b25504d
FIR checker: report REDUNDANT_LABEL_WARNING
...
Since many labels are not present in the FIR tree, this checker is
implemented as a syntax checker. Comparing with FE1.0, this change
reports some REDUNDANT_LABEL_WARNING that FE1.0 has missed, especially
LHS of assignments.
2021-10-25 13:51:01 +03:00
Ivan Kylchik
225b064470
Implement new 'mix' test mode
...
This mode must be used when one configuration will run several tests
for different JUnit versions.
2021-10-25 00:14:20 +03:00
Mikhail Glukhikh
79b98f9173
FIR: introduce synthetic property symbol hierarchy
2021-10-23 01:19:07 +03:00
Mikhail Glukhikh
c673c4cc91
FIR: refactor/use properly FirAccessorSymbol & FirSyntheticPropertySymbol
2021-10-23 01:19:06 +03:00
Dmitriy Novozhilov
06a26a5a74
[FE 1.0/FIR] Fix message of SEALED_SUPERTYPE_IN_LOCAL_CLASS diagnostic
...
^KT-46285 Fixed
2021-10-21 19:39:49 +03:00
Dmitriy Novozhilov
94664694df
[FIR] Prohibit confusing syntax inside when branches
...
^KT-48385
2021-10-21 19:39:46 +03:00
Tianyu Geng
c262f17d75
FIR checker: report violations related to API mode
2021-10-21 00:01:14 +03:00
Denis.Zharkov
f441024fd4
FIR: Derive FirMemberDeclaration from FirAnnotatedDeclaration
...
It's necessary to have the sane logic that FirMemberDeclaration is a subtype of FirDeclaration
The only kind of controversial change here is making FirAnonymousObject
also be FirMemberDeclaration, thus having its own declaration status
2021-10-20 22:05:20 +03:00
Tianyu Geng
603655d63f
FIR IDE: add option to render type without type args
...
This is useful for rendering type annotation for `super`, which does
not require type arguments.
2021-10-20 19:16:49 +02:00
Tianyu Geng
bdc71a3281
FIR IDE: pass candidate super types for AMBIGUOUS_SUPER
...
This way the IDE quickfix do not need to do resolution again to figure
out what super type to offer in the quickfix.
2021-10-20 19:16:48 +02:00
Yan Zhulanow
b7044803d2
[FIR IDE] Move out-of-block modification trigger to FrontendApiTestConfiguratorService
2021-10-20 19:41:29 +03:00
Yan Zhulanow
2894f87541
[FIR IDE] Move test configurators as constructor parameters
2021-10-20 19:41:29 +03:00
Yan Zhulanow
516dd825c2
[FIR IDE] Initial descriptor-based implementation of the Analysis API
2021-10-20 19:41:24 +03:00
Yan Zhulanow
e2c9be0932
[FIR IDE] Extract common components of the Analysis API to separate modules
2021-10-20 19:41:23 +03:00
Nikolay Lunyak
dbfe3524ce
[FIR] Add FirDelegateUsesExtensionPropertyTypeParameterChecker
2021-10-20 16:49:51 +03:00
Dmitriy Novozhilov
bee44c6e0f
[FIR] Split :compiler:fir:resolve module into three different modules
...
Those modules are:
- :compiler:fir:providers, which contains Fir and Symbol providers,
scopes, and different utilities used by them
- :compiler:fir:semantics, which contains different abstractions and
entities which are used in resolution and in checkers
- :compiler:fir:resolve, which contains all stuff related to resolution
and inference
There are two pros of this change:
1. It may increase gradle build, because it allows to compile :fir:resolve
and :fir:checkers modules in parallel
2. Logic of working FIR (scopes, providers, DFA logic system, etc) is
now separated from logic of resolution phases, so for example checkers,
which are depend on scopes physically will not be able to run resolve
in any way
2021-10-18 11:10:47 +03:00
Dmitriy Novozhilov
6995ee9334
[FIR] Move type context and type approximator to separate session compontent
...
This is needed to decouple components which are related to type system
from type inference components
2021-10-18 11:10:47 +03:00
Dmitriy Novozhilov
eadb91f9b2
[FIR] Move accessors to main session components close to declarations of those components
2021-10-18 10:55:39 +03:00
Tianyu Geng
825be3588a
FIR IDE: tolerate KtFirBackingFieldSymbol when getting overridden symbols
2021-10-18 08:29:22 +02:00
Ilya Kirillov
6b453963ef
Analysis API: fix test compilation
2021-10-16 14:49:42 +02:00
Tianyu Geng
ba359fb296
FIR IDE: render captured type
2021-10-16 14:16:26 +02:00
Tianyu Geng
8b44a4685f
FIR IDE: add API to get super types of a KtType
2021-10-16 14:16:25 +02:00
Tianyu Geng
68e70769c8
FIR IDE: return error type for expressions if needed
...
It seems unnatural to filter out error types, given that KtType does
have a way to represent unresolved types.
2021-10-16 14:16:24 +02:00
Tianyu Geng
80b3e2eb69
FIR IDE: move helpers for HasCommonSubtypeTestGenerated
2021-10-16 14:16:23 +02:00
Jinseong Jeon
26673d2b08
FIR IDE: find source of deserialized enum entry
2021-10-15 19:45:05 +00:00
Jinseong Jeon
8023e7fb02
FIR IDE: add a test for resolution of @Retention value
2021-10-15 19:45:04 +00:00