Dmitriy Novozhilov
aa3a73c6c2
[FIR] Move JavaTypeEnhancementState to session component
2021-07-09 14:38:02 +03:00
Andrey Zinovyev
221e642d97
[FIR] Fix inheritance diagnostics for new FirDeclaration hierarchy
...
Plus several small fixes in reporting itself
2021-07-08 18:13:49 +03:00
Andrey Zinovyev
b44785c24e
[FIR] NOTHING_TO_OVERRIDE diagnostic
2021-07-08 18:13:47 +03:00
Andrey Zinovyev
de3f31cf78
[FIR] Partial implementation of DEPRECATION(_ERROR) diagnostics
...
No support for inheritance deprecations
and deprecations in qualifier's parts
2021-07-07 16:19:28 +03:00
Dmitriy Novozhilov
5816d7ae9f
[FIR] Rename FirStatusOwner back to FirMemberDeclaration
2021-06-29 21:03:30 +03:00
Dmitriy Novozhilov
f400477c70
[FIR] Remove generic parameter from FirDeclaration
2021-06-29 21:03:30 +03:00
Dmitriy Novozhilov
725be466f0
[FIR] Move declaration utils to separate package
2021-06-29 21:03:29 +03:00
Dmitriy Novozhilov
1324e9223f
[FIR] Make FirDeclaration an abstract class
2021-06-29 21:03:28 +03:00
Dmitriy Novozhilov
b3e5c6e079
[FIR] Add symbol to all declarations. Get rid of FirSymbolOwner
2021-06-29 21:03:28 +03:00
Dmitriy Novozhilov
a288b8b00e
[FIR] Remove useless type parameters from classes related to diagnostics
...
Generics removed from:
- FirPsiSourceElement
- FirDiagnostic
- FirDiagnosticRenderer
- FirDiagnosticFactory
2021-06-21 13:13:17 +03:00
Tianyu Geng
32f55a2269
FIR checker: report VIRTUAL_MEMBER_HIDDEN
2021-06-09 16:27:49 +03:00
Dmitriy Novozhilov
09e3629d5d
[FIR] Move common checkers container from :entrypoint to :checkers module
2021-05-21 14:18:57 +03:00
Dmitriy Novozhilov
a9838131ad
[FIR] Move jvm specific checkers to checkers.jvm module
2021-05-21 14:18:56 +03:00
Dmitriy Novozhilov
7f18d147c1
[FIR] Introduce new module for jvm specific checkers
2021-05-21 14:18:54 +03:00
Dmitriy Novozhilov
ff3f3d2f9b
[FIR] Properly setup search scope for IC symbol provider
2021-05-20 14:21:49 +03:00
Dmitriy Novozhilov
6e4cc49f1d
[FIR] Cleanup IC provider creation in FirSessionFactory
2021-05-20 14:21:47 +03:00
Andrey Zinovyev
b1c8669b43
[FIR] Resolve infix calls to infix functions only
...
Implements INFIX_MODIFIER_REQUIRED diagnostics
2021-05-20 13:46:27 +03:00
Mikhail Glukhikh
9a13ec9b76
FIR: report WRONG_ANNOTATION_TARGET on types
2021-05-20 12:22:22 +03:00
Mikhail Glukhikh
92ab600081
FIR: add check of SOURCE retention for EXPRESSION-targeted annotation
2021-05-20 12:22:21 +03:00
Mikhail Glukhikh
3663884db2
FIR: support CONDITION_TYPE_MISMATCH diagnostic
...
We report CONDITION_TYPE_MISMATCH on
- loop conditions
- when branch conditions
- binary logic arguments
2021-05-20 12:22:20 +03:00
Dmitriy Novozhilov
99cdb86145
[FIR] Move createSessionWithDependencies to FirSessionFactory
2021-05-19 16:29:20 +03:00
Dmitriy Novozhilov
38fe917141
[FIR] Change order of IC symbol provider and dependency symbol provider
...
This is semantically incorrect, but current behavior leads to problems
in FIR bootstrap due to incorrect setup of IC provider. So this ordering
change is a workaround for now
2021-05-18 20:56:07 +03:00
Ilya Kirillov
aa70c952eb
FIR IDE: fix SOE on opening project
...
Kotlin library may contain cycles which causes SOE in FirModuleInfoBasedModuleData.dependencies
2021-05-17 20:56:57 +02:00
Dmitriy Novozhilov
2abed7161b
[FIR] Get rid of FirJvmModuleInfo
2021-05-14 14:30:36 +03:00
Dmitriy Novozhilov
28e4721a89
[FIR] Check internal visibility in FirJvmModuleVisibilityChecker using module data
2021-05-14 14:30:35 +03:00
Dmitriy Novozhilov
02c58b7a8f
[FIR] Refactor deserialized dependency providers and session factories with FirModuleData
2021-05-14 14:30:33 +03:00
Dmitriy Novozhilov
24f1f7b7b2
[FIR] Unify FirLibrarySession and FirJavaModuleBasedSession into single FirCliSession
2021-05-14 14:30:32 +03:00
Dmitriy Novozhilov
f16194e60d
[FIR] Get rid of FirSession.moduleInfo
2021-05-14 14:30:31 +03:00
Dmitriy Novozhilov
57a8642f5a
[FIR] Add analyzer services to FirModuleData
2021-05-14 14:30:29 +03:00
Dmitriy Novozhilov
92d6b39ffe
[FIR] Add late initialization of session in FirModuleData
2021-05-14 14:30:28 +03:00
Dmitriy Novozhilov
5cfa8694d4
[FIR] Fix all usages of declarationSiteSession
2021-05-14 14:30:27 +03:00
Dmitriy Novozhilov
c523379e6a
[FIR] Move out all JVM specific deserialization logic from AbstractFirDeserializedSymbolsProvider
2021-05-14 14:30:23 +03:00
Dmitriy Novozhilov
e8c4b0e947
[FIR] Rename KotlinScopeProvider to FirKotlinScopeProvider
2021-05-14 14:30:22 +03:00
Dmitriy Novozhilov
4ad7a4a2d1
[FIR] Split KotlinDeserializedJvmSymbolsProvider to common and JVM specific parts
2021-05-14 14:30:21 +03:00
Mikhail Glukhikh
db828a6aad
Generalize FirInterfaceWithSuperclassChecker to FirSupertypesChecker
2021-05-13 16:13:43 +03:00
Mikhail Glukhikh
6d82aa0bc9
Drop duplicating FirPropertyAccessorChecker
2021-05-13 16:13:08 +03:00
Ivan Kochurkin
598501aaf0
[FIR] Improve locations for DEPRECATED_SINCE_KOTLIN_WITHOUT_DEPRECATED, DEPRECATED_SINCE_KOTLIN_WITH_DEPRECATED_LEVEL, DEPRECATED_SINCE_KOTLIN_OUTSIDE_KOTLIN_SUBPACKAGE and other diagnostics, refactor
2021-05-12 18:42:44 +03:00
Ivan Kochurkin
77c137df22
[FIR] Add DEPRECATED_SINCE_KOTLIN_WITHOUT_DEPRECATED diagnostics, fix tests
2021-05-12 18:42:41 +03:00
Ivan Kochurkin
3191e0b925
[FIR] Implement DEPRECATED_SINCE_KOTLIN_WITHOUT_ARGUMENTS diagnostics, fix tests, merge and refactor annotation checkers
2021-05-12 18:42:40 +03:00
Ivan Kochurkin
1be02e3ac4
[FIR] Implement ILLEGAL_KOTLIN_VERSION_STRING_VALUE diagnostics, fix tests
2021-05-12 18:42:36 +03:00
Mark Punzalan
18f617a582
FIR: Make FirAnnotationArgumentChecker a FirAnnotationCallChecker, to
...
run on all annotation calls, including those inside type annotations.
2021-05-06 17:51:22 +03:00
Tianyu Geng
7bb81ef157
FIR: add equality call checker
...
Added checker for FirEqualityOperatorCall. It's surfaced as one of the
following diagnostics depending on the PSI structure and types under
comparison:
* INCOMPATIBLE_TYPES(_WARNING)
* EQUALITY_NOT_APPLICABLE(_WARNING)
* INCOMPATIBLE_ENUM_COMPARISON_ERROR
Comparing with FE1.0, the current implementation is more conservative
and only highlights error if the types are known to follow certain
contracts with `equals` method. Otherwise, the checker reports warnings
instead.
However, the current checker is more strict in the following situations:
1. it now rejects incompatible enum types like `Enum<E1>` and
`Enum<E2>`, which was previously accepted
2. it now rejects incompatible class types like `Class<String>` and
`Class<Int>`, which was previously accepted
3. the check now takes smart cast into consideration, so
`if (x is String) x == 3` is now rejected
2021-05-06 17:50:32 +03:00
Andrey Zinovyev
787c743333
[FIR] Syntax checkers
...
Introduce base class for checkers that dive into source trees.
2021-05-06 17:38:04 +03:00
Jinseong Jeon
e2dc21da90
FIR checker: warn useless as and is
2021-05-05 18:20:51 +03:00
Ilya Kirillov
65ce641b22
FIR IDE: introduce diagnostics tests bases on FIR diagnostics tests
2021-05-04 08:19:49 +02:00
Mikhail Glukhikh
80a449862e
FIR: implement diagnostics for qualifier as stand-alone expression case
2021-04-30 17:59:45 +03:00
Ilya Kirillov
81a7271009
FIR: Decouple AbstractDiagnosticCollectorComponent and AbstractDiagnosticCollector
2021-04-28 17:57:45 +02:00
Dmitriy Novozhilov
32c3f85679
[FIR] Add inline checker for bodies of inline functions
...
This checker doesn't support `@PublishedAPI` yet, so some BB tests for it
were muted. #KT-46270
2021-04-27 18:39:09 +03:00
Ivan Kochurkin
d54808e33f
[FIR] Implement CREATING_AN_INSTANCE_OF_ABSTRACT_CLASS diagnostics, fix tests
2021-04-27 18:27:39 +03:00
Ivan Kochurkin
ea2d9f7c0c
[FIR] Implement UNDERSCORE_IS_RESERVED, UNDERSCORE_USAGE_WITHOUT_BACKTICKS diagnostics (psi only)
2021-04-27 17:03:52 +03:00