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
Jinseong Jeon
c669749915
FIR LC: adapt to split of property annotations during FIR building
...
As of 7243d308 , property annotations are split according to use-site,
and thus, for property accessors and setter parameter, FIR LC needs
to look up accessors and setter parameter with the target use-site.
2021-10-15 13:50:32 +02:00
Mikhail Glukhikh
f4067f05a2
FIR: forbid java.lang.String(String) constructor in JvmMappedScope
...
#KT-49135 Fixed
2021-10-15 01:24:51 +03:00
Mikhail Glukhikh
09bc729b0e
FirDefaultParametersResolver: process imported from objects properly
...
#KT-49083 Fixed
2021-10-15 01:24:51 +03:00
Mikhail Glukhikh
c5a4a5de42
Make FirArrayOfCallTransformer recursive #KT-49076 Fixed
2021-10-15 01:24:49 +03:00
Mikhail Glukhikh
31db76da56
FIR: fix false positives of INNER_CLASS_OF_GENERIC_THROWABLE_SUBCLASS
...
#KT-49129 Fixed
2021-10-15 01:24:47 +03:00
Tianyu Geng
e3b92fe5f3
FIR IDE: move helper to shorten refs to IDE
2021-10-15 00:43:20 +03:00
Tianyu Geng
3877dc8cc3
FIR IDE: tolerate comma in when conditions
...
For invalid code like the following,
```
when {
true, false -> {}
}
```
`false` does not have a corresponding elements on the FIR side and hence
the containing `FirWhenBranch` is returned by `getOrBuildFir`. This
change makes the analysis API bail out for such cases.
2021-10-14 20:50:50 +02:00
Ilmir Usmanov
559d7015f7
Extend NON_MODIFIER_FORM_FOR_BUILT_IN_SUSPEND diagnostic
...
to include "suspend fun" token sequence as well
2021-10-14 12:44:18 +00:00
Denis.Zharkov
cac69edff2
FIR: Fix forEach resolution within local class
2021-10-14 14:01:51 +03:00