use Uninitialized instead of Null without changing Predef#15127
use Uninitialized instead of Null without changing Predef#15127olhotak wants to merge 2 commits intoscala:mainfrom
Conversation
0ffa4d9 to
59cf2a8
Compare
|
how does this relate to Edit: I see now that I guess |
59cf2a8 to
5265bd9
Compare
|
|
5265bd9 to
79b23ab
Compare
|
This PR should wait for #14946 to maximize places where |
This is an alternative to #15124 that does not depend on #15123 and in particular doesn't depend on changing
Predef. The motivation is to try outUninitializedin the compiler first before committing to a specific implementation inPredef.This is a first step towards addressing pain point 1 in #14622. A second step would be to tweak the flow-sensitive analysis with special treatment for
vars whose type is not a supertype ofNull. Such avarcannot havenullwritten into it, so once we know it's non-null, it can never become null again.