Skip to content

Commit c6425f0

Browse files
committed
Fix bug in typer erasure's transformInfo
()Unit translates to ()BoxedUnit not BoxedUnit.
1 parent c1f1d2d commit c6425f0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/dotty/tools/dotc/core/TypeErasure.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ object TypeErasure {
164164
else if (sym.isConstructor) outer.addParam(sym.owner.asClass, erase(tp)(erasureCtx))
165165
else erase.eraseInfo(tp, sym)(erasureCtx) match {
166166
case einfo: MethodType if sym.isGetter && einfo.resultType.isRef(defn.UnitClass) =>
167-
defn.BoxedUnitClass.typeRef
167+
MethodType(Nil, Nil, defn.BoxedUnitClass.typeRef)
168168
case einfo =>
169169
einfo
170170
}

0 commit comments

Comments
 (0)