Jinseong Jeon
e009b71f88
FIR checker: report uninitialized member/extension properties
2021-03-04 17:56:29 +03:00
Jinseong Jeon
f1fa290d49
FIR checker: report val reassignment
2021-03-03 12:27:11 +03:00
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
Dmitriy Novozhilov
2b39282682
[FIR] Render original type before smartcasted type in DEBUG_INFO_EXPRESSION_TYPE
...
This is made for keep consistency with same renderer in FE 1.0
2021-02-16 17:51:32 +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
09640d9d63
FIR checker: apply override checker to anonymous objects
...
^KT-44695 Fixed
2021-02-15 19:16:35 +03:00
Dmitriy Novozhilov
d7e3e83251
[FIR] Update testdata of FIR spec tests
2021-02-09 16:04:41 +03:00
Jinseong Jeon
266432a482
FIR checker: fix condition for property type mismatch on override
2021-02-08 13:01:11 +03:00
Jinseong Jeon
3a07ca4c64
FIR checker: add diagnostic VAR_OVERRIDDEN_BY_VAL
2021-02-03 12:07:36 +03:00
Jinseong Jeon
b48835f3ce
FIR checker: fix positions of type mismatch on overrides
...
To handle implicit return types, those should be reported on
declarations with return type positioning strategy, instead of
return type itself.
2021-02-03 12:07:35 +03:00
Mikhail Glukhikh
0ee4f1f393
FIR: more exact nullability determination in potential UNSAFE_CALL check
2021-01-29 16:55:09 +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
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