Skip to content

Commit c109b9b

Browse files
committed
Handle polytypes
1 parent ac9bb28 commit c109b9b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/tastyreflect/ReflectionCompilerInterface.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1604,7 +1604,7 @@ class ReflectionCompilerInterface(val rootContext: core.Contexts.Context) extend
16041604

16051605
/** Convert `Term` to an `quoted.Expr[Any]` */
16061606
def QuotedExpr_seal(self: Term)(given ctx: Context): scala.quoted.Expr[Any] = self.tpe.widen match {
1607-
case mtpe: Types.MethodType => throw new Exception("Cannot seal a partially applied Term. Try eta-expanding the term first.")
1607+
case _: Types.MethodType | _: Types.PolyType => throw new Exception("Cannot seal a partially applied Term. Try eta-expanding the term first.")
16081608
case _ => new scala.internal.quoted.TastyTreeExpr(self, compilerId)
16091609
}
16101610

0 commit comments

Comments
 (0)