Tianyu Geng
|
c7272f6986
|
FIR checker: SENSELESS_(COMPARISON|NULL_IN_WHEN)
Currently DFA does not set "definitely equal to null" for access to variables that got assigned `null`. For example, FIR should mark the following line as SENSELESS_COMPARISON due to `s = null` above.
https://github.com/JetBrains/kotlin/blob/d1531f9cdd5852352c0133198706125dc63b6007/compiler/testData/diagnostics/tests/smartCasts/alwaysNull.fir.kt#L6
The problem is at https://github.com/JetBrains/kotlin/blob/7e9f27436a77de1c76e3705da7aa1fbe8938336b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/FirDataFlowAnalyzer.kt#L1104
For null assignment, ideally the type should be `Nothing?`. This is
addressed in a followup commit instead.
|
2021-08-06 22:57:16 +03:00 |
|
Ivan Kochurkin
|
ad9b962536
|
[FIR] Fix tests (ARGUMENT_TYPE_MISMATCH instead of INCOMPATIBLE_CANDIDATE)
|
2021-04-12 23:49:55 +03:00 |
|
Mikhail Glukhikh
|
f0ff9ad5a7
|
FIR: rename AMBIGUITY to OVERLOAD_RESOLUTION_AMBIGUITY to match FE 1.0
|
2021-04-02 16:22:01 +03:00 |
|
simon.ogorodnik
|
34e6649d31
|
[FIR] Harden check of argument type properly
Before this commit, nullable argument could match not null parameter.
Now we require also correct nullability that breaks some cases
|
2020-02-03 16:45:18 +03:00 |
|
Dmitriy Novozhilov
|
2536fa0cd5
|
[FIR-TEST] Add new testdata generated after changes in previous commit
|
2019-12-12 16:11:46 +03:00 |
|