Jinseong Jeon
f0f1e2d945
FIR checker: report CAPTURED_VAL_INITIALIZATION
2021-05-20 13:59:13 +03:00
Mikhail Glukhikh
2a33a6927c
FIR: report WRONG_ANNOTATION_TARGET(_WITH_USE_SITE_TARGET) on declarations
2021-05-20 12:22:21 +03:00
Mikhail Glukhikh
0d6bc7e7b2
FIR: report ANNOTATION_CLASS_CONSTRUCTOR_CALL diagnostic
2021-05-20 12:22:20 +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
06b2efe65f
[Test] Introduce new syntax for dependsOn dependencies
2021-05-19 00:52:27 +03:00
Mikhail Glukhikh
1a3aa1bff0
FIR: report ANNOTATION_PARAMETER_DEFAULT_VALUE_MUST_BE_CONSTANT
2021-05-13 16:13:44 +03:00
Mikhail Glukhikh
0f9f63400e
FirSupertypesChecker: implement six more diagnostics
2021-05-13 16:13:43 +03:00
Mikhail Glukhikh
6618b4ea57
FirPropertyAccessorChecker: add three new diagnostics
2021-05-13 16:13:07 +03:00
Andrey Zinovyev
5d30576d28
[FIR] Report not-a-constant diagnostics inside function calls
...
When function calls are not fully resolved
2021-05-13 10:15:26 +03:00
Andrey Zinovyev
e74141ded6
[FIR] Properly check spread constant argument
2021-05-13 10:13:21 +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
Mikhail Glukhikh
67d1c35f19
FIR: report MANY_INTERFACES_MEMBER_NOT_IMPLEMENTED also on interfaces
2021-05-12 17:50:27 +03:00
Jinseong Jeon
8e10b5fdec
FIR: introduce FirExpressionWithSmartcastToNull
...
This new kind of expression encompasses the nullability of the original
expression after null check (or equivalent `is Nothing?` check).
Unlike FirExpressionWithSmartcast, this expression won't be materialized
during conversion to backend IR. Also, Nothing? is discarded when
computing the intersection of possible types from smartcast info.
In that way, Nothing? is not used during resolution, while such
smartcast info is stored in it (and the expression kind itself).
2021-05-11 21:28:44 +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
Jinseong Jeon
e2dc21da90
FIR checker: warn useless as and is
2021-05-05 18:20:51 +03:00
Ilya Kirillov
09a94f3200
FIR IDE: ignore non-passing tests in compiler based 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
Mikhail Glukhikh
84ccf7bbb1
FIR: use Java 8 rules in not implemented checker
2021-04-30 17:59:38 +03:00
Jinseong Jeon
9b39a8abc2
FIR: avoid wrapping an erroneous type as FirResolvedTypeRef
...
Instead, use FirErrorTypeRef, a subtype of FirResolvedTypeRef
2021-04-29 22:31:38 +03: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
Mark Punzalan
1835185b16
FIR: Remove duplicated diagnostics on annotations on types.
2021-04-26 15:11:43 +03:00
Mark Punzalan
e69b729e21
FIR checker: Create a new kind of checker FirTypeChecker and add
...
FirSuspendModifierChecker to report WRONG_MODIFIER_TARGET for `suspend`
on non-functional types.
2021-04-26 15:11:41 +03:00
Mark Punzalan
b88913af1d
FIR checker: Report WRONG_MODIFIER_TARGET for suspend on
...
non-functional types.
2021-04-26 15:11:39 +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
Tianyu Geng
6a03f31e50
FIR: add UnsafeCall resolution diagnostics
...
Previously unsafe call is reported as part of InapplicableWrongReceiver.
This makes it difficult for the downstream checkers to report different
diagnostics.
2021-04-19 15:11:13 +03:00
Mikhail Glukhikh
43a2ad0467
FIR: don't flatten for loop blocks in raw FIR builder
2021-04-19 15:11:12 +03:00
Mikhail Glukhikh
2e14b65644
Introduce FirForLoopChecker
2021-04-19 15:10:58 +03:00
Dmitriy Novozhilov
7fb2bf00c5
Force resolve annotations in annotation checker
...
#KT-46173 Fixed
2021-04-19 14:32:36 +03:00
Ivan Kochurkin
4353365968
[FIR] Implement NULL_FOR_NONNULL_TYPE diagnostics, fix tests
2021-04-19 12:46:08 +03:00
Dmitriy Novozhilov
b530427bb2
Fix substitution of generic types in contracts
...
#KT-41078 Fixed
2021-04-16 17:23:24 +03:00
Dmitriy Novozhilov
91fedd6a12
[FIR] Substitute types from arguments in evaluating of contract
...
#KT-41078
2021-04-16 17:23:22 +03:00
Dmitriy Novozhilov
e869f8091a
[FIR] Properly handle callable references which were resolved with error
2021-04-16 11:12:55 +03:00
Ilya Gorbunov
8041c3aa1d
Support Char.code in constant evaluator, KT-46036
...
But do not consider Char.code a pure integer constant.
2021-04-16 03:58:34 +03:00
Mikhail Glukhikh
9b3f1b9b8a
Inference: handle Exact constraints with captured types properly
...
#KT-41818 Fixed
2021-04-15 15:55:41 +03:00
Dmitriy Novozhilov
1f0ecade34
[FIR] Transform annotations of type refs in body resolve stage
...
Also fix building CFG for annotation calls
2021-04-14 18:30:56 +03:00
Andrey Zinovyev
2b8c22c08a
[FIR] Add CYCLIC_GENERIC_UPPER_BOUND check
2021-04-14 18:11:14 +03:00
Andrey Zinovyev
5ff82addc9
[FIR] Add REIFIED_TYPE_PARAMETER_NO_INLINE check
2021-04-14 18:11:10 +03:00
zadorotskas
334d0a8b5a
FIR: introduce three diagnostics for const val
2021-04-13 21:36:46 +03:00
vldf
57d2eb5da2
Introduce FirFunctionReturnTypeMismatchChecker
2021-04-13 21:36:33 +03:00
vldf
24f1f1221e
Introduce FirInitializerTypeMismatchChecker
2021-04-13 21:36:31 +03:00
Jinseong Jeon
619360fe4d
FIR checker: report UNINITIALIZED_ENUM_(ENTRY|COMPANION)
2021-04-13 08:25:16 +03:00
Ivan Kochurkin
ad9b962536
[FIR] Fix tests (ARGUMENT_TYPE_MISMATCH instead of INCOMPATIBLE_CANDIDATE)
2021-04-12 23:49:55 +03:00
Mikhail Glukhikh
818c54e3a6
FIR: report ABSTRACT_*_NOT_IMPLEMENTED on appropriate intersections
2021-04-09 14:52:34 +03:00
Jinseong Jeon
5a0b75bd89
FIR checker: warn unnecessary safe calls
2021-04-09 12:32:45 +03:00
Jinseong Jeon
2ecb6733ed
FIR checker: warn unnecessary non-null assertions
2021-04-09 12:32:45 +03:00
Ilya Gorbunov
b64b96eee6
Deprecate Char-to-Number conversions in stdlib (JVM and JS)
...
- Int.toChar was left non-deprecated because the replacement is not intrinsic yet.
- Number.toChar was left non-deprecated because otherwise the deprecation propagates to the override, Int.toChar.
KT-23451
2021-04-07 18:30:20 +03:00
Abduqodiri Qurbonzoda
968099fbec
Advance deprecation level of FP to lesser than Int types to ERROR #KT-30360
2021-04-07 00:23:20 +03:00
Abduqodiri Qurbonzoda
e8992c5d19
Advance deprecation level of InputStream.readBytes(estimatedSize) to ERROR
2021-04-06 18:42:53 +03:00
Dmitriy Novozhilov
3cb17ac2f0
[FIR] Implement FirReturnAllowedChecker
...
Supported diagnostics:
- RETURN_NOT_ALLOWED
- RETURN_IN_FUNCTION_WITH_EXPRESSION_BODY
2021-04-06 12:30:41 +03:00
Him188
f90cbb0ce7
Support properties from primary constructor in JvmFieldApplicabilityChecker
...
#KT-32753 In progress
2021-04-06 11:40:44 +03:00