File tree Expand file tree Collapse file tree 3 files changed +275
-270
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 3 files changed +275
-270
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ class Compiler {
7272 new LiftTry , // Put try expressions that might execute on non-empty stacks into their own methods
7373 new HoistSuperArgs , // Hoist complex arguments of supercalls to enclosing scope
7474 new ClassOf , // Expand `Predef.classOf` calls.
75- new CollectNullableFields , // Collect fields that can be null out after use in lazy initialization
75+ new CollectNullableFields , // Collect fields that can be nulled out after use in lazy initialization
7676 new RefChecks ) :: // Various checks mostly related to abstract members and overriding
7777 List (new TryCatchPatterns , // Compile cases in try/catch
7878 new PatternMatcher , // Compile pattern matches
Original file line number Diff line number Diff line change @@ -17,17 +17,17 @@ object CollectNullableFields {
1717 val name = " collectNullableFields"
1818}
1919
20- /** Collect fields that can be null out after use in lazy initialization.
20+ /** Collect fields that can be nulled out after use in lazy initialization.
2121 *
2222 * This information is used during lazy val transformation to assign null to private
2323 * fields that are only used within a lazy val initializer. This is not just an optimization,
2424 * but is needed for correctness to prevent memory leaks. E.g.
2525 *
26- * {{{
26+ * ```scala
2727 * class TestByNameLazy(byNameMsg: => String) {
2828 * lazy val byLazyValMsg = byNameMsg
2929 * }
30- * }}}
30+ * ```
3131 *
3232 * Here `byNameMsg` should be null out once `byLazyValMsg` is
3333 * initialised.
You can’t perform that action at this time.
0 commit comments