From 50e40fffa866e5b41c5df93b3635165ab20e04b1 Mon Sep 17 00:00:00 2001 From: Nicolas Stucki Date: Fri, 3 Feb 2017 10:57:54 +0100 Subject: Fix #1916: fix erasure of implicit xxl closures This commit extends the fix done in #1920 to implicit closures. --- compiler/src/dotty/tools/dotc/transform/Erasure.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'compiler/src/dotty/tools/dotc/transform/Erasure.scala') diff --git a/compiler/src/dotty/tools/dotc/transform/Erasure.scala b/compiler/src/dotty/tools/dotc/transform/Erasure.scala index 00abddd91..bba97c4c2 100644 --- a/compiler/src/dotty/tools/dotc/transform/Erasure.scala +++ b/compiler/src/dotty/tools/dotc/transform/Erasure.scala @@ -349,7 +349,7 @@ object Erasure extends TypeTestsCasts{ if ((owner eq defn.AnyClass) || (owner eq defn.AnyValClass)) { assert(sym.isConstructor, s"${sym.showLocated}") defn.ObjectClass - } else if (defn.isUnimplementedFunctionClass(owner)) + } else if (defn.isXXLFunctionClass(owner)) defn.FunctionXXLClass else if (defn.isImplicitFunctionClass(owner)) recur(defn.FunctionClass(owner.name.functionArity)) @@ -542,7 +542,7 @@ object Erasure extends TypeTestsCasts{ * to deal with boxing and unboxing of value classes ourselves. */ override def typedClosure(tree: untpd.Closure, pt: Type)(implicit ctx: Context) = { - val xxl = defn.isUnimplementedFunctionClass(tree.typeOpt.typeSymbol) + val xxl = defn.isXXLFunctionClass(tree.typeOpt.typeSymbol) var implClosure @ Closure(_, meth, _) = super.typedClosure(tree, pt) if (xxl) implClosure = cpy.Closure(implClosure)(tpt = TypeTree(defn.FunctionXXLType)) implClosure.tpe match { -- cgit v1.2.3