Skip to content

Commit 073c656

Browse files
committed
Fix documentation of uninitialized
1 parent 8d080e9 commit 073c656

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,14 @@ import MegaPhase.MiniPhase
1313
import StdNames.nme
1414
import ast.tpd
1515

16-
/** This phase replaces `compiletime.uninitialized` on the right hand side
17-
* of a mutable field definition by `_`. This avoids a "is declared erased, but is
18-
* in fact used" error in Erasure and communicates to Constructors that the
19-
* variable does not have an initializer.
16+
/** This phase replaces `compiletime.uninitialized` on the right hand side of a mutable field definition by `_`.
17+
* This avoids a
18+
* ```scala
19+
* "@compileTimeOnly("`uninitialized` can only be used as the right hand side of a mutable field definition")`
20+
* ```
21+
* error in Erasure and communicates to Constructors that the variable does not have an initializer.
22+
*
23+
* @syntax markdown
2024
*/
2125
class UninitializedDefs extends MiniPhase:
2226
import tpd._

0 commit comments

Comments
 (0)