diff --git a/library/src/scala/quoted/Expr.scala b/library/src/scala/quoted/Expr.scala index 67b7d2fe6d9d..161ebe53a18a 100644 --- a/library/src/scala/quoted/Expr.scala +++ b/library/src/scala/quoted/Expr.scala @@ -31,14 +31,14 @@ object Expr { */ object Exprs { /** An Expr backed by a pickled TASTY tree */ - final class TastyExpr[T](val tasty: Pickled, val args: Seq[Any]) extends Expr[T] { + final class TastyExpr[+T](val tasty: Pickled, val args: Seq[Any]) extends Expr[T] { override def toString: String = s"Expr()" } /** An Expr backed by a lifted value. * Values can only be of type Boolean, Byte, Short, Char, Int, Long, Float, Double, Unit, String or Null. */ - final class LiftedExpr[T](val value: T) extends Expr[T] { + final class LiftedExpr[+T](val value: T) extends Expr[T] { override def toString: String = s"Expr($value)" } @@ -54,7 +54,7 @@ object Exprs { } /** An Expr representing `'{(~f).apply(~x)}` but it is beta-reduced when the closure is known */ - final class FunctionAppliedTo[T, U](val f: Expr[T => U], val x: Expr[T]) extends Expr[U] { + final class FunctionAppliedTo[T, +U](val f: Expr[T => U], val x: Expr[T]) extends Expr[U] { override def toString: String = s"Expr($f $x)" } }