Dmitriy Novozhilov
663d5026d8
[Test] Migrate FIR diagnostic spec tests to new infrastructure
...
This commit includes a lot of minor changes in testdata: new infrastructure
requires that each test file in one testdata file in one module must
have unique name, but a lot of existing spec tests didn't satisfy
this requirement
2021-01-25 17:08:32 +03:00
Jinseong Jeon
39df3e2b0a
FIR checker: introduce member function checker
2021-01-15 14:38:35 +03:00
Mikhail Glukhikh
0c0dbd6245
[FIR] Perform more accurate pre-check of candidate receiver type
2021-01-11 17:57:04 +03:00
Victor Petukhov
b4d8adeeb4
Don't clean type info for containment operator if the resolution was unsuccessful, but all diagnostics were about only input types and non-strict only input types check was enabled
2020-12-25 11:53:09 +03:00
Jinseong Jeon
5167d69b7c
FIR checker: introduce member property checker
2020-12-04 16:58:30 +03:00
Mikhail Glukhikh
52a07e31c7
[FIR] Remove D_I_EXPRESSION_TYPE from qualified calls in spec test data
...
In FIR, the source of FirFunctionCall is set to call's selector.
In practice, sometimes (e.g. for DEBUG_INFO_CALL)
we expect the selector as the source,
and sometimes (e.g. for DEBUG_INFO_EXPRESSION_TYPE)
we expect the whole qualified call as the source.
Also, some diagnostics, like REDUNDANT_CALL_OF_CONVERSION_METHOD,
are expected to be reported on a selector, not on a whole call.
At this moment we ignore the problem & just don't support
DEBUG_INFO_EXPRESSION_TYPE for qualified calls.
2020-11-26 08:37:48 +03:00
Denis Zharkov
14305d1eba
FIR: Simplify callable references resolution
...
Also that fixes some bugs
2020-11-16 15:50:39 +03:00
Denis Zharkov
d4c7d4fc7c
FIR: Fix callable references resolution with stub receivers
...
Use stubReceiver as a receiver for fake calls
See issues KT-43358 KT-43359 KT-43378
2020-11-16 15:50:39 +03:00
Denis Zharkov
f97cc0b62d
FIR: Rework receivers processing in resolution
...
- Put extensionReceiver to candidate even if it's explicit (for sake of clarity)
- Split CheckReceiver (dispatch part should only check nullability)
2020-11-16 15:50:39 +03:00
Denis Zharkov
a5545b96cb
FIR: Fix ambiguity between current Companion and one from supertypes
...
Companion as qualifier should be found at static scope not a member one
2020-11-10 14:26:54 +03:00
Mikhail Glukhikh
abc2866902
[FIR] Fold flexible types after substitution if possible
2020-10-23 08:12:16 +03:00
Dmitriy Novozhilov
bf1a00c73a
[FIR] Rework resolution of declaration statuses
...
There is introduced algorithm of resolution with jumps: before
resolution of some class we resolve all status of members of its
supertypes, so we can properly determine inherited visibility
and modifiers
2020-10-21 11:53:10 +03:00
Pavel Kirpichenkov
ef44077cb7
[FIR] Restore variable fixation direction in call completion
...
Several tests are affected by the usage of fixation direction calculator in FIR.
Restored to mimimize test data changes.
It is unnecessary in FE10 because a type variable with unknown type
is inferred into an error type, but affects test data in FIR where
Nothing/Any is selected by direction (as a temporary measure).
CR candidate in spec test is Unresolved in FIR because top-level CRs are resolved as call arguments.
Resolution ambiguity is also present in FE10 when CR is wrapped into an id call.
2020-10-13 11:00:21 +03:00
anastasiia.spaseeva
31de584d14
[Spec tests] Generate sections json map
2020-10-01 12:32:22 +03:00
Victor Petukhov
d02432cf93
Introduce warning for the changing arguments execution order for named varargs (KT-17691)
2020-10-01 12:15:13 +03:00
Dmitriy Novozhilov
5efd533f55
[FIR] Desugar unary plus and minus as part of integer literal
...
#KT-42016
2020-09-23 14:05:09 +03:00
Dmitriy Novozhilov
535898c8a4
[FIR] Fix processing integer operator calls for not integer types
2020-09-14 10:57:10 +03:00
Dmitriy Novozhilov
1dc3c93efa
[FIR] Don't assume types with not found symbol as error types
2020-09-11 12:13:33 +03:00
Simon Ogorodnik
bf2e17b133
[FIR] Extract invoke processing from TowerLevelHandler
2020-08-28 00:12:17 +03:00
Nick
61e21dadec
[FIR] Add 3 type mismatch diagnostics
2020-08-24 11:06:12 +03:00
Denis Zharkov
5ede37d6ab
Report warnings on safe call + nullable extension operator
...
^KT-41034 In Progress
2020-08-14 11:12:34 +03:00
Nick
4669e019d1
[FIR] Add diagnostic CONFLICTING_OVERLOADS & REDECLARATION
2020-08-10 10:09:37 +03:00
Jinseong Jeon
0e54f98b79
FIR: support adapted callable reference with vararg
2020-08-03 16:37:36 +03:00
Mikhail Glukhikh
dc46d51d9a
[FIR TEST] Update diagnostic spec test data
2020-08-02 18:19:47 +03:00
Dmitriy Novozhilov
f283f2db43
[FIR] Improve diagnostic reporting & don't use error symbol for candidate if possible
...
Also introduce few new diagnostics:
- NONE_APPLICABLE more many inapplicable candidates
- HIDDEN for visible candidates
2020-07-28 20:46:56 +03:00
anastasiia.spaseeva
5c0528b61e
[Spec tests] Add tests for primary constructors declaration
2020-07-28 20:26:33 +03:00
anastasiia.spaseeva
0488dc985f
[Spec tests] Add tests for intersection and OR
2020-07-28 20:26:32 +03:00
anastasiia.spaseeva
46774fb6d6
[Spec tests] Add call without an explicit receiver tests for top-level non-extension functions
2020-07-28 20:26:32 +03:00
anastasiia.spaseeva
bef59055cd
[Spec tests] Fix test cases structure
2020-07-28 20:26:31 +03:00
anastasiia.spaseeva
4ad3847224
[Spec tests] Add tests for subtyping rules for simple classifier type
2020-07-28 20:26:30 +03:00
anastasiia.spaseeva
1801344c76
[Spec tests] Add tests for inner-and-nested-type-contexts section
2020-07-28 20:26:29 +03:00
anastasiia.spaseeva
d5ddb26180
[Spec tests] Add overload resolution tests for plus assign operator call
2020-07-28 20:26:28 +03:00
anastasiia.spaseeva
1d83c59e80
[Spec tests] Actualize test for callable reference section
2020-07-28 20:26:27 +03:00
anastasiia.spaseeva
4db209648d
[Spec tests] Update spec version
2020-07-28 20:26:26 +03:00
anastasiia.spaseeva
3f862830f2
[Spec tests] Add tests for resolving callable references and some co-tests
2020-07-28 20:26:24 +03:00
anastasiia.spaseeva
cfbfec77a5
[Spec tests] Add tests for Algorithm of MSC selection
2020-07-28 20:26:23 +03:00
anastasiia.spaseeva
26ac87d9be
[Spec tests] Update spec testData
2020-07-28 20:26:21 +03:00
Ivan Kylchik
3c01a39846
[FIR] Update test data after introducing new fir nodes
2020-07-21 13:54:17 +03:00
Mikhail Zarechenskiy
100a6f70ca
Relax rules about inferring to Nothing for special calls
...
#KT-37388 Fixed
#KT-38427 Fixed
#KT-39953 Fixed
#KT-38899 Fixed
2020-07-16 09:56:46 +03:00
Ivan Kylchik
307871a050
[FIR] Unmute fir spec tests
...
#KT-38397 Fixed
#KT-38334 Fixed
2020-07-09 23:49:39 +03:00
Ivan Kylchik
92a51b9794
[FIR] Add illegal underscore check in BaseFirBuilder
2020-07-03 12:06:49 +03:00
Ivan Kylchik
d0f6997e6d
[FIR] Fix some of fir spec tests for real-literals
...
#KT-38336 Fixed
2020-07-03 12:06:44 +03:00
Dmitriy Novozhilov
26458875d5
[FIR] Add checker for uninitialized properties
2020-06-19 15:53:09 +03:00
anastasiia.spaseeva
9d862aaa1d
[Spec tests] Remove spec info from fir tests
2020-05-26 17:27:06 +03:00
Victor Petukhov
379c6944a2
NI: extract diagnostics from partially resolved call instead of separately handling it including running all checks
...
^KT-37630 Fixed
^KT-35494 Fixed
2020-05-22 22:13:53 +03:00
anastasiia.spaseeva
c736a1e5b0
[Spec tests] Update testsMap for when-expression section
2020-05-22 02:52:02 +03:00
anastasiia.spaseeva
d9160a26e9
[Spec tests] Add property helpers to testMaps
2020-05-22 02:52:02 +03:00
anastasiia.spaseeva
270972ca1c
[Spec tests] Make main link nullable for case if implementation tests don't have this one
2020-05-22 02:52:00 +03:00
anastasiia.spaseeva
3a46b5a45a
[Spec tests] Add path element at testMaps for main links also
2020-05-22 02:52:00 +03:00
anastasiia.spaseeva
d94c212a60
[Spec tests] Add linkType element to testMaps
2020-05-22 02:51:59 +03:00