Skip to content

Commit 9e5cfe2

Browse files
committed
Fix error in box\unbox logic.
TermRef's for primitive types are of primitive-type.
1 parent ffe0131 commit 9e5cfe2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/dotty/tools/dotc/transform/Erasure.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ object Erasure {
205205
else recur(cast(qual, erasedPre))
206206

207207
def recur(qual: Tree): Tree = {
208-
val qualIsPrimitive = isPrimitiveValueType(qual.tpe)
208+
val qualIsPrimitive = isPrimitiveValueType(qual.tpe.widen)
209209
val symIsPrimitive = sym.owner.isPrimitiveValueClass
210210
if ((sym.owner eq defn.AnyClass) || (sym.owner eq defn.AnyValClass))
211211
select(qual, defn.ObjectClass.info.decl(sym.name).symbol)

0 commit comments

Comments
 (0)