File tree 2 files changed +5
-9
lines changed
compiler/src/dotty/tools/dotc 2 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -7,15 +7,11 @@ import dotty.tools.dotc.core.Types.Type
7
7
8
8
/** Phantom erasure erases (minimal erasure):
9
9
*
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
11
11
* 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.
19
15
*/
20
16
object PhantomErasure {
21
17
Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ import Decorators._
110
110
else if (sym eq defn.BoxedUnitClass ) ref(defn.BoxedUnit_UNIT )
111
111
else if (sym eq defn.ErasedPhantomClass ) ref(defn.ErasedPhantom_UNIT )
112
112
else {
113
- assert(false ) // Not in sync with isErasableBottomField
113
+ assert(false , sym + " has no erased bottom tree " )
114
114
EmptyTree
115
115
}
116
116
}
You can’t perform that action at this time.
0 commit comments