Skip to content

Commit a73316a

Browse files
authored
Refactoring the global object initialization checker (#17996)
This PR refactors the global object initialization checker as implemented in `compiler/src/dotty/tools/dotc/transform/init/Objects.scala` with the following: 1. Refactoring the type hierarchy for abstract values by adding a new base class `ValueElement` which has `Cold` and `Ref` as child classes. This separates the first-order abstract values (`Cold` and `Ref`) from second-order abstract values (`Refset`) 2. Adding documentation for the data structures and abstract syntax used in the initialization checker 3. Adding return handlers which removes the warning for return statements in secondary constructors, which is shown in `tests/init-global/pos/secondary-constructor-return.scala`
2 parents b9b1314 + ed00aaa commit a73316a

File tree

2 files changed

+143
-72
lines changed

2 files changed

+143
-72
lines changed

0 commit comments

Comments
 (0)