Denis.Zharkov
0aca3a3737
FIR: Adjust test data after introduction of INFERENCE_NO_INFORMATION_FOR_PARAMETER
...
See previous commits for details
2021-06-07 15:25:47 +03:00
Denis.Zharkov
c420957eac
FIR: Report INFERENCE_NO_INFORMATION_FOR_PARAMETER diagnostic
2021-06-07 15:25:45 +03:00
Ivan Kochurkin
da15f0ffe8
[FIR] Consider fullyExpandedType instead of original type in isSubtypeForTypeMismatch, consider lookupTag in isError method
2021-06-03 18:24:36 +03:00
Dmitriy Novozhilov
796f8e6bce
Revert "FIR checkers: report SMARTCAST_IMPOSSIBLE"
...
This reverts commit 84334b08
2021-06-03 09:48:50 +03:00
Tianyu Geng
84334b087c
FIR checkers: report SMARTCAST_IMPOSSIBLE
2021-06-02 13:19:12 +03:00
Victor Petukhov
54b9f39b3a
Update tests after rebase
2021-05-28 15:36:24 +03:00
Victor Petukhov
bd7fb56a24
Fix builder inference tests
2021-05-28 15:36:23 +03:00
Victor Petukhov
4a767c597e
Don't report the same diagnsotics several times
2021-05-28 15:36:23 +03:00
Victor Petukhov
758eb8f851
Fix builder inference tests
2021-05-28 15:36:22 +03:00
Victor Petukhov
0f317b01b4
Rename language feature StableBuilderInference to UnrestrictedBuilderInference
2021-05-28 15:36:19 +03:00
Victor Petukhov
0b37b2be6a
Add addtional tests for builder inference
2021-05-28 15:36:19 +03:00
Victor Petukhov
ac7b459f2a
Do subtyping with stub types properly
...
1) Return stub type if we are calculating super type between two same stub types
2) Return nullable Any if those stub types are different
2021-05-28 15:36:15 +03:00
Denis.Zharkov
dac9d7b17a
FIR: Mark a pack of tests (53) as FIR_IDENTICAL
2021-05-25 13:28:29 +03:00
Denis.Zharkov
ddbdfafa79
Remove OI/NI attributes from test data
2021-05-25 13:28:27 +03:00
Denis.Zharkov
2ecba6ac39
Remove WITH_NEW_INFERENCE directive from all tests
...
This directive anyway does not make test run twice with OI, and with NI
It only once run the test with specific settings (// LANGUAGE)
and ignores irrelevant (OI or NI tags)
2021-05-25 13:28:26 +03:00
Denis.Zharkov
a801eccf66
FIR: Report ARGUMENT_TYPE_MISMATCH instead of TYPE_MISMATCH for arguments
2021-05-20 17:24:51 +03:00
Denis.Zharkov
da3233c47d
FIR: Update test data (NEW_INFERENCE_ERROR)
...
Though these diagnostics look correct (the calls or constraint
systems indeed contain errors), more precise diagnostic kinds should be
chosen later.
2021-05-20 17:24:36 +03:00
Denis.Zharkov
00821bbc63
FIR: Update test data (repeated diagnostics)
...
They are a bit redundant, but it needs additional work to be done
to avoid them
2021-05-20 17:24:33 +03:00
Denis.Zharkov
dbc0ebd861
FIR: Update test data
...
changed INAPPLICABLE_CANDIDATE -> ARGUMENT_TYPE_MISMATCH
2021-05-20 17:24:32 +03:00
Denis.Zharkov
b94335dd1c
FIR: Update diagnostics test data
...
Green code correctly became red
2021-05-20 17:24:30 +03:00
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