Commit Graph

25871 Commits

Author SHA1 Message Date
Mikhail Glukhikh 5c224ad17c FIR: fix positioning in fun interface checker 2021-04-23 17:29:34 +03:00
Артём 393a19db54 FIR: introduce FunInterfaceDeclarationChecker 2021-04-23 17:29:25 +03:00
Dmitriy Novozhilov 234ab3b35d [FIR] Fix all illegal usages of declarationSiteSession in compiler
There are still some usages in IDE which should be investigated
2021-04-22 14:32:04 +03:00
Dmitriy Novozhilov f98f41bbc3 [FIR] Rename session to declarationSiteSession in declaration builders 2021-04-22 14:32:03 +03:00
Dmitriy Novozhilov c3b1be1a39 [FIR] Rename FirDeclaration.session to declarationSiteSession 2021-04-22 14:32:02 +03:00
Jinseong Jeon 24d792fb49 FIR checker: warn useless elvis 2021-04-22 13:10:54 +03:00
Ilya Kirillov e2786197ff FIR IDE: support reporting of FirLightSourceElement based diagnostics 2021-04-21 22:22:32 +03:00
Ilya Kirillov 47e8b2f9dc FIR IDE: remove copy-pasted code from DeclarationCopyBuilder 2021-04-21 21:17:00 +03:00
Ilya Kirillov da6c5e13d5 FIR IDE: add completion support to classes and to type aliases 2021-04-21 21:16:56 +03:00
Ilya Kirillov a5c33c8d42 FIR IDE: simplify completion context retrieving 2021-04-21 21:16:55 +03:00
pyos e6d923f65c FIR: rename HIDDEN to INVISIBLE_REFERENCE
Some of them should be INVISIBLE_MEMBER though
2021-04-21 16:18:21 +03:00
Anton Yalyshev fe5e968896 Add change-notes for 1.5.0 release 2021-04-21 14:13:46 +03:00
Vladimir Dolzhenko 590a8d088d Refine locking to avoid dead lock
#KT-46215 Fixed
2021-04-21 11:01:12 +00:00
Julia 387dafb8c5 [FIR] Introduce AnnotationUsedAsAnnotationArgumentChecker 2021-04-21 13:22:07 +03:00
Andrey Zinovyev 5fc1514104 [FIR][LightTree] Better expression identification
And some refactoring
Regenerate IDE parts
2021-04-20 18:13:06 +03:00
Igor Yakovlev e4870740e1 [LC] Fixed light classes nullability for Kotlin 1.5
Fixed #KT-44472
2021-04-20 15:21:12 +02:00
Ilya Kirillov 26e39b3d2a FIR IDE: do not resolve all members for getting inner classes for light classes 2021-04-20 01:32:26 +03:00
Ilya Kirillov 051310124b FIR IDE: do not fail duplicating classes with members 2021-04-20 01:32:25 +03:00
Mark Punzalan 73b796f184 FIR IDE: Enable RemoveExclExclCallFix for UNNECESSARY_NON_NULL_ASSERTION. 2021-04-19 22:29:07 +02:00
Mark Punzalan 34609b264d FIR IDE: Move RemoveExclExclCallFix to idea-frontend-independent. 2021-04-19 22:29:07 +02:00
yantimirov-timur 1dfc3c0520 FIR: add getter visibility and setter return type checks 2021-04-19 19:21:09 +03:00
Ilmir Usmanov f5379c5a04 Add @JvmInline annotation in common code if JVM target is present
#KTIJ-8863 Fixed
 #KT-46088 Fixed
2021-04-19 16:56:31 +03:00
Ivan Kochurkin 00bc04b3df [FIR] Implement ELSE_MISPLACED_IN_WHEN diagnostics, fix tests 2021-04-19 15:46:38 +03:00
Mikhail Glukhikh 8a2cab346a Fix FIR IDE tests (EXPRESSION_EXPECTED, ITERATOR_MISSING, etc.) 2021-04-19 15:11:17 +03:00
Tianyu Geng b5caa658d6 FIR: introduce delegate diagnostics
This commit adds diagnostics for the following

* DELEGATE_SPECIAL_FUNCTION_MISSING
* DELEGATE_SPECIAL_FUNCTION_AMBIGUITY
* DELEGATE_SPECIAL_FUNCTION_NONE_APPLICABLE
2021-04-19 15:11:16 +03:00
Tianyu Geng 454ae3b17a FIR checker: report UNSAFE_CALL for overloaded function calls
Previously if an unsafe call is to an overloaded function, FIR checkers
report NONE_APPLICABLE. This change instead report them as UNSAFE_CALL
or its variants.
2021-04-19 15:11:13 +03:00
Mikhail Glukhikh a736d62edd FirForLoopChecker: report also OPERATOR_MODIFIER if appropriate + minor
This commits checks iterator/hasNext/next functions whether they are
declared as operator or not. Also, it changes logic of hasNext/next
error reporting, now we're able to report errors about both these
functions.
2021-04-19 15:11:10 +03:00
Mikhail Glukhikh 2e14b65644 Introduce FirForLoopChecker 2021-04-19 15:10:58 +03:00
Mikhail Glukhikh eb831b9afc FIR: support separate ANONYMOUS_FUNCTION_WITH_NAME 2021-04-19 15:10:38 +03:00
Mikhail Glukhikh 6b95bcdbdb FIR: support separate ASSIGNMENT_IN_EXPRESSION_CONTEXT 2021-04-19 15:10:18 +03:00
Mikhail Glukhikh 9894b97058 FIR: rename EXPRESSION_REQUIRED to EXPRESSION_EXPECTED 2021-04-19 15:09:50 +03:00
Ilya Kirillov 26ea0be635 FIR IDE: temporary update testdata until diagnostic collection for delegated objects is fixed 2021-04-19 13:52:47 +02:00
Ilya Kirillov f40f506852 FIR: move components from AbstractDiagnosticCollectorVisitor to CheckerRunningDiagnosticCollectorVisitor 2021-04-19 13:52:46 +02:00
Ilya Kirillov ea233cddf8 FIR: rename goToNestedDeclarations -> visitNestedElements 2021-04-19 13:52:46 +02:00
Ilya Kirillov eed143d17b FIR: remove beforeRunningAllComponentsOnElement/beforeRunningSingleComponentOnElement from AbstractDiagnosticCollectorVisitor 2021-04-19 13:52:45 +02:00
Ilya Kirillov 41e822e8cb FIR IDE: fix duplicated diagnostic collection 2021-04-19 13:52:44 +02:00
Ilya Kirillov 5829f1a6e7 FIR IDE: add more test cases to TraversalCounterTestGenerated 2021-04-19 13:52:43 +02:00
Ilya Kirillov e78e8f8c79 FIR IDE: fix behaviour of DiagnosticTraversalCounterTest 2021-04-19 13:52:43 +02:00
Ilya Kirillov 32c1101959 FIR IDE: introduce tests for checking diagnostic visitor context collection 2021-04-19 13:52:42 +02:00
Ilya Kirillov ac993754e1 FIR IDE: collect diagnostics context under read lock 2021-04-19 13:52:41 +02:00
Ilya Kirillov ce62348709 FIR IDE: do not report suppressed diagnostics 2021-04-19 13:52:41 +02:00
Ilya Kirillov fd082b1574 FIR IDE: get rid of DiagnosticCollectorDeclarationAction 2021-04-19 13:52:40 +02:00
Ilya Kirillov e79c133331 FIR IDE: separate diagnostics collection and checker context collection 2021-04-19 13:52:39 +02:00
Ilya Kirillov 29a0c448a6 FIR IDE: remove FirIdeFileDiagnosticsCollector as unused 2021-04-19 13:52:38 +02:00
Ilya Kirillov f9d415eda6 FIR: make AbstractDiagnosticCollector.Visitor non-inner 2021-04-19 13:52:37 +02:00
Ivan Kochurkin 4353365968 [FIR] Implement NULL_FOR_NONNULL_TYPE diagnostics, fix tests 2021-04-19 12:46:08 +03:00
Andrei Klunnyi 81a5ae7780 KT-44431 Quickfix to move to sealed: suggests tests source root
From now on we display the source root matching the target directory.

^KT-44431 Fixed
2021-04-16 19:38:52 +02:00
Andrei Klunnyi eed4cb4f00 KT-44431 Quickfix to move to sealed: refactoring
Sealed super class directory is now calculated in a more
straightforward way.
2021-04-16 19:38:52 +02:00
Ilmir Usmanov 7b14975740 Add 'value' modifier to modifier order
Otherwise, there will be unfixable 'non-canonical modifier order'
warning
 #KT-46088
 #KTIJ-5636 Fixed
2021-04-16 18:51:44 +03:00
Dmitriy Novozhilov c65553bb8a [FIR] Get rid of source element type parameter from diagnostic factories 2021-04-16 14:08:11 +03:00