Mark Punzalan
504449f03e
FIR: Report UNSAFE_CALL instead of SMARTCAST_IMPOSSIBLE when smartcast
...
to null.
Currently the error message shows the expression is impossible to
smartcast to the nullable type, which is nonsensical since it's already
that type.
2021-07-30 21:49:50 +03:00
Andrey Zinovyev
7e9f27436a
[FIR] Fix cfg for safe call inside elvis
2021-07-19 13:40:31 +03:00
Dmitriy Novozhilov
4225813d79
[FIR] Update CFG dumps according to changed order of visiting class children
2021-06-29 21:03:29 +03:00
Tianyu Geng
ce767046eb
FIR checkers: report SMARTCAST_IMPOSSIBLE
2021-06-10 16:01:13 +03:00
Dmitriy Novozhilov
796f8e6bce
Revert "FIR checkers: report SMARTCAST_IMPOSSIBLE"
...
This reverts commit 84334b08
2021-06-03 09:48:50 +03:00
Tianyu Geng
84334b087c
FIR checkers: report SMARTCAST_IMPOSSIBLE
2021-06-02 13:19:12 +03:00
Tianyu Geng
6a03f31e50
FIR: add UnsafeCall resolution diagnostics
...
Previously unsafe call is reported as part of InapplicableWrongReceiver.
This makes it difficult for the downstream checkers to report different
diagnostics.
2021-04-19 15:11:13 +03:00
Ilya Kirillov
0cf00d0f72
FIR: fix FirDefaultPropertyAccessor phase to BODY_RESOLVE
2021-04-15 15:23:56 +03:00
Dmitriy Novozhilov
f794ced888
[FIR] Fix incorrect cluster creating in CFG dumps
2020-10-12 11:55:05 +03:00
Dmitriy Novozhilov
68f3d84e22
[FIR] Use CandidateApplicability from FE 1.0
2020-09-09 12:38:34 +03:00
Oleg Ivanov
4367d6631f
[FIR] Add CallsInPlace contract analyzer
2020-08-11 16:17:01 +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
Ivan Kylchik
3c01a39846
[FIR] Update test data after introducing new fir nodes
2020-07-21 13:54:17 +03:00
Dmitriy Novozhilov
102c9c08d0
[FIR] Resolve elvis call as special synthetic call
...
Before that commit we desugared `a ?: b` as
when (val elvis = a) {
null -> b
else -> elvis
}
It was incorrect, because `a` should be resolved in dependent mode,
but when it was `elvis` initializer it was resolved in independent
mode, so we can't infer type for `a` in some complex cases
2020-07-02 15:10:51 +03:00
Dmitriy Novozhilov
26458875d5
[FIR] Add checker for uninitialized properties
2020-06-19 15:53:09 +03:00
Dmitriy Novozhilov
12ed8c3bb4
[FIR-TEST] Update CFG dumps according to new nodes order
2020-06-19 15:53:04 +03:00
Dmitriy Novozhilov
87859b0faa
[FIR] Introduce new algorithm for building CFG for declarations
2020-06-19 15:53:00 +03:00
Denis Zharkov
723b275d99
FIR: Fix rendered fir and DFA graph test data after safe-calls refactoring
...
^KT-38444 In Progress
2020-06-03 10:43:37 +03:00
Dmitriy Novozhilov
1d39270b3e
[FIR] Don't pass data flow to property accessors of non local classes
2020-04-03 10:08:24 +03:00
Dmitriy Novozhilov
1d1b8d3290
[FIR-TEST] Update cfg dumps according to previous commits
2020-04-03 10:08:23 +03:00
Dmitriy Novozhilov
8cb6e8f8af
[FIR] Add control flow graph for class initialization
2020-04-03 10:08:17 +03:00
Dmitriy Novozhilov
cc07ae96b3
[FIR-TEST] Move analysis tests to separate module
2020-03-19 09:51:01 +03:00