From 6cdb3d45bf2b0b9ebfad73991be37a80f0c8639f Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Fri, 29 May 2015 11:15:04 +0200 Subject: Make ensureMethodic work after erasure. Previously it didn't, because it created an ExprType, which is illegal after erasure. --- src/dotty/tools/dotc/core/TypeErasure.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/dotty/tools/dotc/core/TypeErasure.scala') diff --git a/src/dotty/tools/dotc/core/TypeErasure.scala b/src/dotty/tools/dotc/core/TypeErasure.scala index fac795ef8..92e32d4b1 100644 --- a/src/dotty/tools/dotc/core/TypeErasure.scala +++ b/src/dotty/tools/dotc/core/TypeErasure.scala @@ -164,7 +164,7 @@ object TypeErasure { else if (sym.isConstructor) outer.addParam(sym.owner.asClass, erase(tp)(erasureCtx)) else erase.eraseInfo(tp, sym)(erasureCtx) match { case einfo: MethodType if sym.isGetter && einfo.resultType.isRef(defn.UnitClass) => - MethodType(Nil, Nil, defn.BoxedUnitClass.typeRef) + MethodType(Nil, defn.BoxedUnitClass.typeRef) case einfo => einfo } -- cgit v1.2.3