Skip to content

Commit fefbe4c

Browse files
committed
Fix typos and indentation
1 parent f060565 commit fefbe4c

File tree

3 files changed

+275
-270
lines changed

3 files changed

+275
-270
lines changed

compiler/src/dotty/tools/dotc/Compiler.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

compiler/src/dotty/tools/dotc/transform/CollectNullableFields.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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.

0 commit comments

Comments
 (0)