Mikhail Glukhikh
34c90aab3b
FIR: introduce & use REFERENCE_BY_QUALIFIER positioning strategy
2021-02-19 18:24:46 +03:00
Mikhail Glukhikh
04caa5c612
Fix DEBUG_INFO_CALL positioning in FIR
2021-02-19 18:24:45 +03:00
pyos
2dc0404751
FIR: prioritize visible imported classes during type resolution
...
and produce an error on ambiguity.
2021-02-16 12:38:45 +03:00
Jinseong Jeon
e72ddbcbfe
FIR checker: differentiate UNSAFE_CALL from INAPPLICABLE_CANDIDATE
...
To do so, inside the root cause of inapplicable candidate errors,
we will record expected/actual type of receiver, if any.
That will help identifying inapplicable calls on nullable receiver.
2021-01-29 16:54:23 +03:00
Dmitriy Novozhilov
9b80a552e9
[Test] Update testdata of spec tests
2021-01-28 13:19:25 +03:00
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
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
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
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
535898c8a4
[FIR] Fix processing integer operator calls for not integer types
2020-09-14 10:57:10 +03:00
Simon Ogorodnik
bf2e17b133
[FIR] Extract invoke processing from TowerLevelHandler
2020-08-28 00:12:17 +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
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
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
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
9d862aaa1d
[Spec tests] Remove spec info from fir tests
2020-05-26 17:27:06 +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
anastasiia.spaseeva
3a31150df4
[Spec tests] Metadata refactoring: remove duplicated links in testMaps
2020-05-22 02:51:58 +03:00
anastasiia.spaseeva
d32aca87d1
[Spec tests] Change metadata structure of implementation and spec tests
2020-05-22 02:51:57 +03:00
Denis Zharkov
3bb6aa6f28
Mark as FIR_IDENTICAL passing spec tests
2020-04-21 10:16:42 +03:00
Denis Zharkov
39d4231894
FIR: Adjust testData for spec tests: discrepancy in DEBUG_INFO_CALL format
...
In old FE, there are fake overrides rendered, while in FIR there are
real declarations
2020-04-21 10:16:36 +03:00
Denis Zharkov
bddea7d163
FIR: Adjust testData for spec tests: local scopes in overload resolution
...
The behavior of FIR seems to be the correct one
^KT-36475
2020-04-21 10:16:35 +03:00
Denis Zharkov
706ccb2cf9
FIR: Adjust testData for spec tests: invoke on nullable receiver
...
It's a design problem, see related issue
^KT-30415
2020-04-21 10:16:34 +03:00
Denis Zharkov
f0d35a2478
FIR: Adjust testData for spec tests: operator priority
...
^KT-38351 Submitted
2020-04-21 09:52:52 +03:00
Denis Zharkov
5c7c4b4cb6
FIR: Adjust testData for spec tests: infix priority
...
^KT-37374 Please, fix the tests
2020-04-21 09:52:52 +03:00
Denis Zharkov
54546eb890
FIR: Adjust testData for spec tests: unsupported DEBUG_INFO_CALL format
2020-04-21 09:52:52 +03:00
Denis Zharkov
f8791549f3
FIR: Adjust testData for spec tests: enum "values" priority
...
^KT-38350 Submitted
2020-04-21 09:52:52 +03:00
Denis Zharkov
12ceaf24e2
FIR: Adjust testData for spec tests: resolution ambiguity
...
Renaming AMBIGUITY -> OVERLOAD_RESOLUTION_AMBIGUITY may help
^KT-38342 Submitted
2020-04-21 09:52:52 +03:00
Denis Zharkov
3cb2b0cab1
Ignore irrelevant diagnostics in overload-set related spec tests
2020-04-21 09:52:52 +03:00
Denis Zharkov
0aed7375e6
Ignore irrelevant diagnostics in overload-set related spec tests
2020-04-21 09:52:52 +03:00
anastasiia.spaseeva
b1dbacf45f
[Spec tests] Fix test-info parser for relevant places
2020-04-01 16:30:24 +03:00
anastasiia.spaseeva
9f684bfd65
[Spec tests] Add tests for call-with-specified-type-parameters
2020-04-01 16:30:23 +03:00
anastasiia.spaseeva
0397470b85
[Spec tests] Update tests with spec version 0.1-313
2020-03-30 19:12:55 +03:00
Victor Petukhov
a29385e758
[Spec tests] Small clean-up CheckerTestUtil and around it
2020-03-30 11:15:55 +03:00
anastasiia.spaseeva
90d1cdf2e1
[Spec tests] Add tests for section call-with-trailing-lambda-expressions
2020-03-30 11:15:55 +03:00
anastasiia.spaseeva
4736b3b348
[Spec tests] Add tests for call-with-named-parameters
2020-03-30 11:15:55 +03:00