Skip to content

Commit b6c15f8

Browse files
committed
Update doc
1 parent 6e07bcb commit b6c15f8

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

compiler/src/dotty/tools/dotc/core/PhantomErasure.scala

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,11 @@ import dotty.tools.dotc.core.Types.Type
77

88
/** Phantom erasure erases (minimal erasure):
99
*
10-
* - Parameters/arguments are erased to BoxedUnit. The next step will remove the parameters
10+
* - Parameters/arguments are erased to ErasedPhantom. The next step will remove the parameters
1111
* from the method definitions and calls (implemented in branch implement-phantom-types-part-2).
12-
* - Definitions of `def`, `val`, `lazy val` and `var` returning a phantom type to return a BoxedUnit. Where fields
13-
* with BoxedUnit type are not memoized (see transform/Memoize.scala).
14-
* - Calls to Phantom.assume become calls to BoxedUnit. Intended to be optimized away by local optimizations.
15-
*
16-
* BoxedUnit is used as it fits perfectly and homogeneously in all locations where phantoms can be found.
17-
* Additionally some of the optimizations that can be performed on phantom types can also be directly implemented
18-
* on all boxed units.
12+
* - Definitions of `def`, `val`, `lazy val` and `var` returning a phantom type to return a ErasedPhantom. Where fields
13+
* with ErasedPhantom type are not memoized (see transform/Memoize.scala).
14+
* - Calls to Phantom.assume become calls to ErasedPhantom.UNIT. Intended to be optimized away by local optimizations.
1915
*/
2016
object PhantomErasure {
2117

0 commit comments

Comments
 (0)