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
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
Tianyu Geng
8bec5cec61
FIR LL: fix KtDeclarationAndFirDeclarationEqualityChecker
...
1. Nullable function type is not rendered correctly.
2. Bounds of type parameters are not considered during comparison, this
would incorrectly treat different declarations as the same, for
example
```
fun <C: List<String>> C.foo() {}
fun <C: Set<String>> C.foo() {}
```
2021-10-23 15:33:32 +02:00
Tianyu Geng
5a1680ca3b
FIR LL: fix resolving proerties in library
...
Property can be overloaded with different extension receiver type.
2021-10-23 15:33:31 +02: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
Mikhail Glukhikh
7b9ac4c5f7
FIR: create constructors copies with correct containers in JvmMappedScope
...
#KT-49133 Fixed
2021-10-23 01:17:10 +03:00
Dmitriy Novozhilov
a2b8493f47
[FE 1.0] Prohibit using non exhaustive if and when in rhs of elvis expression
...
^KT-44705
^KT-49349 Fixed
2021-10-21 19:39:51 +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
Dmitriy Novozhilov
1513e739c6
[FE 1.0] Prohibit confusing syntax inside when branches
...
^KT-48385 Fixed
2021-10-21 19:39:36 +03:00
Tianyu Geng
c262f17d75
FIR checker: report violations related to API mode
2021-10-21 00:01:14 +03:00
Denis.Zharkov
4ad5f01324
FIR: Support overrides of generic-typed members with raw-typed ones
...
^KT-49070 Fixed
2021-10-20 22:05:25 +03:00
Denis.Zharkov
a0a57581ec
FIR: Do not add alias for variables with explicit type
2021-10-20 22:05:24 +03:00
Denis.Zharkov
fba44759c0
FIR: Refine visibility check for class members
2021-10-20 22:05:23 +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
7c3706dd3f
[FIR IDE] Disable dependent analysis session tests for FE10 implementation
2021-10-20 19:41:30 +03: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
8f39640237
[FIR IDE] Move test file analysis in FE10 Analysis API implementation to FrontendApiTestConfiguratorService
2021-10-20 19:41:28 +03:00
Yan Zhulanow
a1280ed723
[FIR IDE] Move testPrefix to FrontendApiTestConfiguratorService
2021-10-20 19:41:27 +03:00
Yan Zhulanow
e12c7d1292
[FIR IDE] Extract Fe10AnalysisFacade from KtFe10AnalysisSession
2021-10-20 19:41:26 +03:00
Yan Zhulanow
e06a75c197
[FIR IDE] Add separate test data for descriptor-based Analysis API implementation
2021-10-20 19:41:26 +03:00
Yan Zhulanow
1272c6aa33
[FIR IDE] Update Analysis API test data, untie it from the FIR implementation
2021-10-20 19:41:25 +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
Mikhail Glukhikh
7fc19520a5
FIR: substitute super type during tower building properly #KT-49301 Fixed
2021-10-20 12:17:04 +03:00
Ilmir Usmanov
3f8fa3149b
Support extensions in functional supertypes
...
Under a flag for now.
2021-10-18 18:53:26 +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
39939c7213
FIR IDE: add helper checking if a type is flexbily nullable
2021-10-16 14:16:24 +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
Mark Punzalan
167dc81d3b
FIR/Analysis API: Get parameter name from function type notation or
...
`@ParameterName` annotation, which is also now added during type
resolution.
2021-10-15 16:19:00 +03:00
Tianyu Geng
c10879be43
FIR IDE: get type of unresovled super
...
FIR does not provide any type for unresolved super so we manually
synthesize such types for completion to work.
2021-10-15 14:12:43 +02:00