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
Dmitriy Novozhilov
469252f6b4
[FIR] Don't create smartcast node if smartcasted type is equal to original type
2021-02-20 10:23:33 +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
Mikhail Glukhikh
357a7907a3
FIR: fix type approximation by visibility
2021-02-19 10:39:57 +03:00
Dmitriy Novozhilov
373bc578fb
[FIR] Implement capturing of cone types same as for kotlin types
2021-02-17 16:23:08 +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
Dmitriy Novozhilov
d4c26cca52
[FIR] Use type without smartcast for local variable with smartcasted initializer
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
5711a8d610
[FIR] Support PreliminaryLoopVisitor in FIR DFA
2021-02-15 11:37:39 +03:00
Jinseong Jeon
20f9787c70
FIR checker: report errors in contract description
2021-02-11 17:02:18 +03:00
Jinseong Jeon
3d635b6a94
FIR: unwrap smartcast expression when extracting effects of contract
2021-02-11 17:02:16 +03:00
Jinseong Jeon
5e150d62ea
FIR checker: differentiate UNSAFE_IMPLICIT_INVOKE_CALL from UNSAFE_CALL
2021-02-10 17:38:44 +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
Dmitriy Novozhilov
b351ca6bd4
[Test] Regenerate spec tests
2021-02-02 17:54:50 +03:00
Mikhail Glukhikh
7d4eaefd36
FIR: report UNSAFE_CALL on dot when possible
2021-01-29 16:55:26 +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
ca3bb02897
[TD] Update spec testdata after f06a5321
2021-01-25 17:16:54 +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
Victor Petukhov
f06a5321a6
Approximate definitely not-null types for type parameter's types if they are already not-null (has not-null upper bounds)
...
^KT-44440 Fixed
2021-01-25 14:17:58 +03:00
Mikhail Glukhikh
06ee768c6a
FIR: in case of smart cast, use original type for FirThisRcvrExpression
...
Before this commit, we used type after smart cast both for original
FirThisReceiverExpression and for wrapping FirExpressionWithSmartCast.
However, this makes FIR2IR implicit cast generator work incorrectly
(it decides not to insert implicit cast because original type is the same).
After this commit, expressions have different types and implicit cast
generator works properly.
2021-01-23 10:56:34 +03:00
Jinseong Jeon
39df3e2b0a
FIR checker: introduce member function checker
2021-01-15 14:38:35 +03:00
Alexander Udalov
0d8f909bda
Use ObsoleteTestInfrastructure instead of Deprecated in black box tests
2021-01-13 19:34:24 +01:00
Alexander Udalov
221f44da5f
Fix warnings in stdlib/compiler/plugins/test code
2021-01-13 19:18:20 +01:00
Mikhail Glukhikh
0c0dbd6245
[FIR] Perform more accurate pre-check of candidate receiver type
2021-01-11 17:57:04 +03:00
Dmitriy Novozhilov
1e67702128
[Test] Introduce opt in @ObsoleteTestInfrastructure for migrating tests to new infrastructure
2021-01-11 14:19:10 +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
Dmitriy Novozhilov
d15c7861b2
[TEST] Invert dependency between :test-generator and :tests-common modules
...
This is needed to provide ability for declaring new implementations of
test generators, based on existing infrastructure, which won't add
dependency on :compiler:tests-common
Also this commit removes implicit dependency on :compiler:tests-common
from :compiler:tests-common-new
2020-12-16 19:52:29 +03:00
Dmitriy Novozhilov
bc7e18fb8a
[TEST] Regenerate tests after previous commit
2020-12-16 19:52:28 +03:00
Dmitriy Novozhilov
c8f3a4802e
[TEST] Introduce test-infrastructure-utils module and extract common test utilities here
2020-12-16 19:52:22 +03:00
Dmitriy Novozhilov
23c088afd6
[TEST-GEN] Reorganize package structure in :generators:test-generator module
2020-12-16 19:52:20 +03:00
Dmitriy Novozhilov
380e8a3814
[TEST-GEN] Extract run of TestGenerator to top of test generation DSL
2020-12-16 19:52:19 +03:00
Jinseong Jeon
cdfe1771d9
FIR DFA: reimplement type OR operation to its original semantics
...
#KT-43569 Fixed
2020-12-07 10:50:19 +03:00
Jinseong Jeon
5167d69b7c
FIR checker: introduce member property checker
2020-12-04 16:58:30 +03:00
Dmitriy Novozhilov
e4e28a5495
Build: update grovy dependencies in :compiler:tests-spec
2020-11-28 14:25:48 +03:00
Mikhail Glukhikh
037c505069
Unbind general FirDiagnostic from PsiFile & PsiElement
2020-11-26 08:37:49 +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
Mikhail Glukhikh
82c5cefba9
Update test data in FIR diagnostic spec tests
2020-11-26 08:37:48 +03:00
Mikhail Glukhikh
1795c4f3e5
Implement common Diagnostic(Factory/Renderer) in related FIR classes
2020-11-26 08:37:46 +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
Dmitriy Novozhilov
87380d1913
[FIR] Don't assume that exit lambda node is target for exceptional exit for inplace lambdas
...
#KT-39709 Fixed
#KT-43156 Fixed
2020-11-12 14:46:38 +03:00