diff options
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/src/dotty/tools/dotc/transform/Erasure.scala | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/src/dotty/tools/dotc/transform/Erasure.scala b/compiler/src/dotty/tools/dotc/transform/Erasure.scala index 71ecb5c65..00abddd91 100644 --- a/compiler/src/dotty/tools/dotc/transform/Erasure.scala +++ b/compiler/src/dotty/tools/dotc/transform/Erasure.scala @@ -542,7 +542,9 @@ 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 implClosure @ Closure(_, meth, _) = super.typedClosure(tree, pt) + val xxl = defn.isUnimplementedFunctionClass(tree.typeOpt.typeSymbol) + var implClosure @ Closure(_, meth, _) = super.typedClosure(tree, pt) + if (xxl) implClosure = cpy.Closure(implClosure)(tpt = TypeTree(defn.FunctionXXLType)) implClosure.tpe match { case SAMType(sam) => val implType = meth.tpe.widen |