Ivan Kochurkin
263e40e753
[FIR] Implement NO_RECEIVER_ALLOWED
2021-07-28 22:52:06 +03:00
Andrey Zinovyev
d84cc4333c
[FIR] Add INITIALIZATION_BEFORE_DECLARATION diagnostic
2021-07-28 16:56:54 +03:00
Andrey Zinovyev
b706e776ad
[FIR] Add VARIABLE_WITH_NO_TYPE_NO_INITIALIZER diagnostic
2021-07-28 16:56:53 +03:00
Ilya Kirillov
91ecaa32e3
HL API: render local fqNames in reference resolve tests
2021-07-27 17:58:47 +03:00
Ilya Kirillov
77fcb12af8
Fix project leaking in tests
...
The project was leaking via MockApplication -> LowMemoryWatcherManager -> List<Project>
It happened due to unregistered disposable provided to the MockApplication
2021-07-27 17:58:47 +03:00
Ilya Kirillov
f19dfd9d2a
HL API: restore SymbolByReferenceTest
...
Now it is possible as references are working in HL API tests now
2021-07-27 17:58:46 +03:00
Ilya Kirillov
c678d4b506
HL API: generate reference resolve tests
...
The testdata is taken from corresponding IDE reference resolve tests
2021-07-27 17:58:45 +03:00
Ilya Kirillov
7ba8e7d1d3
LL API: fix KtPackageProvider package existent checks for tests
...
Before it was not able to check nested packages for existence
Also, implement unimplemented getKotlinSubPackageFqNames
2021-07-27 17:58:45 +03:00
Ilya Kirillov
4fe240d1b4
HL API: fix KtUserType kt -> fir mapping for non-IDEA usages
...
createType(KtTypeElement) requires some access to IJ services which are unavailable to IJ core
2021-07-27 17:58:44 +03:00
Ilya Kirillov
970d7b5a78
HL API: implement tests for reference resolve
2021-07-27 17:58:43 +03:00
Ilya Kirillov
55489b6249
FIR IDE: fix containing KtFirSymbolContainingDeclarationProvider for implicit constructors
2021-07-27 17:58:42 +03:00
Ilya Kirillov
eb69153fbc
HL API: fix renderer for package symbols
2021-07-27 17:58:40 +03:00
Mikhail Glukhikh
84bd347841
Make EXPERIMENTAL_API_USAGE_ERR warning till 1.6 for signature type case
2021-07-27 14:58:56 +03:00
Mikhail Glukhikh
810def829c
Make EXPERIMENTAL_ANNOTATION_ON_OVERRIDE warning till 1.6
2021-07-27 14:58:55 +03:00
Igor Yakovlev
f671061328
[FIR IDE] Add check resolved type for phase less than Types
2021-07-26 23:08:54 +02:00
Igor Yakovlev
02f2f6c148
[FIR IDE] Code review minor changes
2021-07-26 23:08:54 +02:00
Igor Yakovlev
4eb534e39b
[FIR IDE] Remove withFirWithPossibleResolve inside function
2021-07-26 23:08:54 +02:00
Igor Yakovlev
563f8c8541
[FIR IDE] Split names of withRef function to phase and type versions
2021-07-26 23:08:54 +02:00
Igor Yakovlev
66fa624ab7
[FIR IDE] Fix IDE return type calculators
2021-07-26 23:08:54 +02:00
Igor Yakovlev
4711577b17
[FIR IDE] Add containing file workaround for FirLightAnonymousClassForSymbol
2021-07-26 23:08:54 +02:00
Igor Yakovlev
a4426cd40d
[FIR IDE] Fix invalid partial resolve of file annotations
2021-07-26 23:08:54 +02:00
Igor Yakovlev
e1c8f302a4
[FIR IDE] Make fir resolve phase volatile and remove locks
2021-07-26 23:08:54 +02:00
Igor Yakovlev
78e249c2d5
[FIR IDE] Fix creating fir light classes for NotUnderContentRootModuleInfo module content
2021-07-26 23:08:53 +02:00
Igor Yakovlev
4e870b6796
[FIR IDE] Fix invalid resolve for fir synthetic properties and accessors
2021-07-26 23:08:53 +02:00
Igor Yakovlev
6700179ee4
[FIR IDE] Add LibraryModuleSourceInfoBase and filter out light classes for sources from libraries
2021-07-26 23:08:53 +02:00
Igor Yakovlev
6869fbbfe5
[FIR IDE] Insert ensure resolve into checkers and scopes
2021-07-26 23:08:53 +02:00
Igor Yakovlev
2fd6c55fc8
[FIR IDE] Replace FIR phase update to FIR IDE
2021-07-26 23:08:53 +02:00
Ivan Kochurkin
173813f7cf
[FIR] Implement REIFIED_TYPE_FORBIDDEN_SUBSTITUTION
2021-07-26 21:13:25 +03:00
Ivan Kochurkin
bade6cb611
[FIR] Improve TYPE_PARAMETER_AS_REIFIED detecting, implement TYPE_PARAMETER_AS_REIFIED_ARRAY, TYPE_PARAMETER_AS_REIFIED_ARRAY_WARNING
2021-07-26 21:13:25 +03:00
Ivan Kochurkin
2333b1bcf6
[FIR] Implement BREAK_OR_CONTINUE_JUMPS_ACROSS_FUNCTION_BOUNDARY
2021-07-26 21:13:23 +03:00
Alexander Udalov
5526281c54
Minor, refactor diagnostic tests on repeatable annotations
2021-07-26 14:33:32 +02:00
Mikhail Glukhikh
7cbea12c8a
FIR: store all annotationContainers in checker context
2021-07-23 23:58:58 +03:00
Mikhail Glukhikh
82f268d611
FIR: add EXPERIMENTAL_API_USAGE reporting
2021-07-23 23:58:55 +03:00
Mikhail Glukhikh
3235b09a92
FIR: introduce MutableCheckerContext to save performance
2021-07-23 23:48:19 +03:00
Jinseong Jeon
e9f2d574d5
FIR IDE: simplify HL APIs for PsiType
...
The idea is to convert `KtType` to `PsiType`, along with the given
`PsiElement` context, instead of providing individual API to convert
different psi source to `PsiType`. To that end, we need to
migrate/rewrite some APIs/implementations that retrieve `KtType` from
different source of `PsiElement`.
2021-07-23 13:28:14 +02:00
Jinseong Jeon
f02f3c76ae
FIR IDE: API to resolve KtTypeReference to KtType
2021-07-23 13:28:11 +02:00
Jinseong Jeon
5358d4f07c
FIR IDE: construct function type from a function as PsiType
2021-07-23 13:28:05 +02:00
Jinseong Jeon
f19a501cc7
FIR IDE: common super type of given KtExpression's
2021-07-23 13:27:59 +02:00
Jinseong Jeon
5690b4d8c2
FIR IDE: get the return type of KtDeclaration as PsiType
2021-07-23 13:27:57 +02:00
Dmitriy Novozhilov
9b00776dba
[FIR] Create CFG node for ::class calls
2021-07-23 12:20:39 +03:00
Tianyu Geng
c648356887
FIR: report ENUM_ENTRY_AS_TYPE and IS_ENUM_TYPE
...
These two diagnostics are similar: both are reported on type references
to enum entries. But `IS_ENUM_TYPE` is reported if the type ref is an
operand of `is` operator. To pass along this contextual information, a
boolean is added to FirSpecificTypeResolverTransformer.
2021-07-22 20:39:56 +03:00
Tianyu Geng
6dc75c2e51
FIR IDE: allow KtClassOrObject to resolve to null KtSymbol
...
At PSI level, an enum entry is a `KtClassOrObject`. But the resolved
FIR counterpart `FirEnumEntry` is not an `FirRegularClass`.
2021-07-22 20:39:56 +03:00
Tianyu Geng
bea90e0578
FIR: remove unused diagnsotics
...
These diagnostics do not exist in FE1.0 and they are not used
anywhere.
2021-07-22 20:39:55 +03:00
Leonid Startsev
83c1a75c1e
Revert "Revert "Instantiation of annotations for JVM IR with the corresponding feature flag""
...
Fix incorrectly rebased ce0a3a57df
This reverts commit 3d0126d5
2021-07-21 18:24:07 +03:00
Dmitriy Novozhilov
a710a8d10f
[FE 1.0] Report warning on non-exhaustive when statements only after 1.6
...
^KT-47709
2021-07-21 17:53:05 +03:00
Leonid Startsev
3d0126d5dd
Revert "Instantiation of annotations for JVM IR with the corresponding feature flag"
...
because of incorrect rebase
This reverts commit ce0a3a57
2021-07-21 15:23:24 +03:00
Leonid Startsev
ce0a3a57df
Instantiation of annotations for JVM IR with the corresponding feature flag
...
Seperate checker for platforms that do not support this language feature yet
Synthetic implementations of annotations are generated on-demand with proper
equals, hashCode, and annotationType methods
#KT-47699 Fixed
2021-07-21 10:23:51 +00:00
Nikita Bobko
39fa2b0baf
Delete Kotlin IntelliJ IDEA plugin sources
...
Kotlin plugin sources were migrated to intellij-community:
https://github.com/JetBrains/intellij-community/tree/master/plugins/kotlin
Preserve `jps-plugin/testData/incremental`
because it's used in `compiler/incremental-compilation-impl/test`
Preserve `idea/testData/multiModuleHighlighting/multiplatform`
because it's used in `MppHighlightingTestDataWithGradleIT`
2021-07-21 11:23:43 +02:00
Roman Golyshev
59304ba70c
FIR IDE: use correct out of block modification tracker
...
Follow-up to eead868cd2
2021-07-20 19:15:38 +03:00
Roman Golyshev
4e67afcaba
FIR IDE: Use write lock in KtFirOverrideInfoProvider implementation
...
`withFir` takes read lock, but checking visibility or implementation
status actually requires resolving declaration to `STATUS` phase. But
resolve cannot be done in `withFir` function, since resolve requires
write lock, and you cannot take both read and write lock
Now we use `withFirWithPossibleResolveInside`, which takes write lock
and allows to perform resolve in it
This should fix failing `FirOverrideImplementTest` tests
in Kotlin IDE plugin
2021-07-20 19:02:26 +03:00