Logo
Explore Help
Register Sign In
azalea/kotlin-fork
1
0
Fork 0
You've already forked kotlin-fork
Code Issues Pull Requests Actions Packages Projects Releases Wiki Activity
Files
c7272f6986ceaff9448a017a55f074b9ebe8a269
kotlin-fork/compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/when
T
History
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
..
kt36818.fir.kt
FIR checker: SENSELESS_(COMPARISON|NULL_IN_WHEN)
2021-08-06 22:57:16 +03:00
kt36818.kt
…
kt36818.txt
…
withoutSubject.fir.kt
[FIR-TEST] Update testdata of old FE contracts tests
2020-04-15 11:13:01 +03:00
withoutSubject.kt
…
withoutSubject.txt
…
withSubject.fir.kt
[FIR-TEST] Update testdata of old FE contracts tests
2020-04-15 11:13:01 +03:00
withSubject.kt
…
withSubject.txt
…
withSubjectNullableBoolean.fir.kt
[FIR] Add ReturnsImplies effect analyzer
2020-08-12 11:06:07 +03:00
withSubjectNullableBoolean.kt
…
withSubjectNullableBoolean.txt
…
Powered by Gitea Version: 1.26.1 Page: 3564ms Template: 2ms
Auto
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API