Denis.Zharkov
26002a040f
Remove OI/NI attributes from test data
2021-05-25 10:25:05 +03:00
Denis.Zharkov
fe1d540c95
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 10:25:04 +03:00
Denis.Zharkov
accd48de8c
FIR: Properly deserialize upper bounds of classes type parameters
...
^KT-46661 Fixed
2021-05-25 10:25:04 +03:00
Ivan Kochurkin
cf531dbbe6
[FIR] Implement TYPE_VARIANCE_CONFLICT, TYPE_VARIANCE_CONFLICT_IN_EXPANDED_TYPE diagnostics, fix tests
2021-05-25 00:07:33 +03:00
Ivan Kochurkin
ef53f0e0b3
[FIR] Render diagnostics parameters instead of full text in debug messages (closer to old tests)
2021-05-25 00:07:32 +03:00
Mark Punzalan
d2b8204fdc
FIR/FIR IDE: Use entire FirVariableAssignment when reporting UNSAFE_CALL
...
(e.g., `nullable.a = b`), and use positioning strategies to locate the
dot in the LHS expression.
Without it, only the callee reference is reported on, which makes the
highlighting of the error and application of quickfixes incorrect in the
IDE.
Also fixed issue with annotated and/or labeled expressions on LHS of
assignment (e.g., `(@Ann label@ i) = 34`).
2021-05-20 20:32:58 +02:00
Dmitriy Novozhilov
3fc7e0ed03
[FIR] Remove COMPARE_WITH_LIGHT_TREE from default directives of fir diagnostic tests
2021-05-20 20:20:40 +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
7c05c6420a
FIR: Update test data (incorrect NEW_INFERENCE_ERROR with self types)
...
^KT-46661 Relates
2021-05-20 17:24:48 +03:00
Denis.Zharkov
9265377d51
FIR: Update test data (SAM conversions)
...
See KT-46372
2021-05-20 17:24:39 +03:00
Denis.Zharkov
601500fd99
FIR: Update test data (extension function type -> function type)
...
See KT-46371
2021-05-20 17:24:38 +03:00
Denis.Zharkov
e46199d28b
FIR: Update test data (nested type aliases)
...
It's not consistent with FE 1.0, but behavior
for nested type alias is undefined, yet.
2021-05-20 17:24:37 +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
010a0c6cdc
FIR: Update test data (delegate inference)
...
Changed data looks correct
2021-05-20 17:24:35 +03:00
Denis.Zharkov
7c5c744e87
FIR: Update test data (suspicious diagnostic on return statement)
...
There should be errors, but different: cannot infer parameter type
^KT-46422 Relates
2021-05-20 17:24:34 +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
Denis.Zharkov
78ec4b5248
FIR: Mute property-delegation-inference related tests
...
They started failing once we began reporting diagnostics from completion
The main reason is that we resolve `delegate()` call
from `delegate().getValue()` in the independent context, while in FE 1.0
it's being resolved within the same system as getValue
^KT-46420 Relates
2021-05-20 17:24:15 +03:00
Denis.Zharkov
cd401b5b8a
FIR: Update integer literal-related tests
...
They started failing once we began reporting diagnostics from completion
^KT-46419 Relates
2021-05-20 17:24:14 +03:00
Denis.Zharkov
a700fdc312
FIR: Report diagnostics introduced during call completion
2021-05-20 17:24:10 +03:00
Jinseong Jeon
f0f1e2d945
FIR checker: report CAPTURED_VAL_INITIALIZATION
2021-05-20 13:59:13 +03:00
Andrey Zinovyev
d38effcbbe
Use camel-case in FirFunctionCallOrigin
...
Also componentCall is operator call
2021-05-20 13:46:35 +03:00
Andrey Zinovyev
419aa65381
[FIR] Fix more tests because of modifier usage in resolution
2021-05-20 13:46:34 +03:00
Andrey Zinovyev
07a8ae7e71
[FIR] Mark more calls origin as OPERATOR
2021-05-20 13:46:32 +03:00
Andrey Zinovyev
0a45b3a50b
[FIR] Set Function call origin to assign operators' functions
2021-05-20 13:46:31 +03:00
Andrey Zinovyev
e021e25d6c
[FIR] Resolve operator calls to operator functions only
2021-05-20 13:46:29 +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
6dd41b617a
FIR: position INAPPLICABLE_FILE_TARGET on file use-site (when possible)
2021-05-20 12:22:22 +03:00
Mikhail Glukhikh
6572010eed
Introduce use-site annotation target checks for FIR
2021-05-20 12:22:22 +03:00
Mikhail Glukhikh
9a13ec9b76
FIR: report WRONG_ANNOTATION_TARGET on types
2021-05-20 12:22:22 +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
d11092ae3c
FIR: support WRONG_ANNOTATION_TARGET on expressions
2021-05-20 12:22:21 +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
4b00a43b22
FIR: add ANNOTATION_ON_SUPERCLASS diagnostic
2021-05-20 12:22:20 +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
Mikhail Glukhikh
e85d97b894
FIR: introduce separate THROWABLE_TYPE_MISMATCH
2021-05-20 12:22:20 +03:00
Dmitriy Novozhilov
e08df2c530
[Test] Add diagnostics and codegen tests with hmpp module structure
2021-05-19 00:52:31 +03:00
Dmitriy Novozhilov
06b2efe65f
[Test] Introduce new syntax for dependsOn dependencies
2021-05-19 00:52:27 +03:00
Victor Petukhov
b78c645fb0
Report warnings by enhanced base types
2021-05-18 17:52:39 +03:00
Victor Petukhov
cba221c18a
Add test for enhancement in usages of annotated type parameter
2021-05-18 17:52:21 +03:00
Victor Petukhov
fd6475c804
Update tests
2021-05-18 17:52:19 +03:00
Victor Petukhov
8602d1fcf0
Merge foreign annotation tests for sources and binaries into single directory
2021-05-18 17:52:16 +03:00
Victor Petukhov
df2c95e444
[Jspecify] Use bounds of type parameters for warnings reporting as well
2021-05-18 17:52:14 +03:00
Victor Petukhov
0c4cba549d
[Jspecify] Use arguments of enhancement of type instead of arguments of base type during getting enhancement of type deeply
2021-05-18 17:52:12 +03:00
Victor Petukhov
21dada4d2d
[Jspecify] Use enhancement of type with enhancement if possible during substitution
2021-05-18 17:52:10 +03:00
Victor Petukhov
12f6146bdf
[Jspecify] Substitute enhancement of type instead of type itself directly
2021-05-18 17:52:09 +03:00
Victor Petukhov
2479655708
[Jspecify] Do preserving flexibility when adding equality constraints by taking into account type with enhancement
2021-05-18 17:52:07 +03:00
Victor Petukhov
937e82db46
[Jspecify] Report warnings on violated bounds of method type parameters
2021-05-18 17:52:06 +03:00