File tree 3 files changed +275
-270
lines changed
compiler/src/dotty/tools/dotc 3 files changed +275
-270
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ class Compiler {
72
72
new LiftTry , // Put try expressions that might execute on non-empty stacks into their own methods
73
73
new HoistSuperArgs , // Hoist complex arguments of supercalls to enclosing scope
74
74
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
76
76
new RefChecks ) :: // Various checks mostly related to abstract members and overriding
77
77
List (new TryCatchPatterns , // Compile cases in try/catch
78
78
new PatternMatcher , // Compile pattern matches
Original file line number Diff line number Diff line change @@ -17,17 +17,17 @@ object CollectNullableFields {
17
17
val name = " collectNullableFields"
18
18
}
19
19
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.
21
21
*
22
22
* This information is used during lazy val transformation to assign null to private
23
23
* fields that are only used within a lazy val initializer. This is not just an optimization,
24
24
* but is needed for correctness to prevent memory leaks. E.g.
25
25
*
26
- * {{{
26
+ * ```scala
27
27
* class TestByNameLazy(byNameMsg: => String) {
28
28
* lazy val byLazyValMsg = byNameMsg
29
29
* }
30
- * }}}
30
+ * ```
31
31
*
32
32
* Here `byNameMsg` should be null out once `byLazyValMsg` is
33
33
* initialised.
You can’t perform that action at this time.
0 commit comments