Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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`
- Loading branch information