Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions library/src/scala/quoted/Expr.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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(<pickled tasty>)"
}

/** 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)"
}

Expand All @@ -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 <applied to> $x)"
}
}