Skip to content

Commit 0702d4b

Browse files
committed
Simplify unpickleExpr and unpickleType
1 parent ed0f80b commit 0702d4b

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

compiler/src/dotty/tools/dotc/quoted/QuoteContext.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ import scala.runtime.quoted.Unpickler._
1010

1111
class QuoteContext private (val tasty: scala.tasty.Reflection) extends scala.quoted.QuoteContext {
1212

13-
def unpickleExpr[T](pickledExpr: PickledExpr, args: PickledExprArgs): given scala.quoted.QuoteContext => Expr[T] = given qctx => {
13+
def unpickleExpr[T](pickledExpr: PickledExpr, args: PickledExprArgs): Expr[T] = {
1414
new scala.internal.quoted.TastyTreeExpr(
15-
PickledQuotes.unpickleExpr(pickledExpr, args) given qctx.tasty.rootContext.asInstanceOf[Context]
15+
PickledQuotes.unpickleExpr(pickledExpr, args) given this.tasty.rootContext.asInstanceOf[Context]
1616
).asInstanceOf[Expr[T]]
1717
}
1818

19-
def unpickleType[T](pickledType: PickledType, args: PickledTypeArgs): given scala.quoted.QuoteContext => Type[T] = given qctx => {
19+
def unpickleType[T](pickledType: PickledType, args: PickledTypeArgs): Type[T] = {
2020
new scala.internal.quoted.TreeType(
21-
PickledQuotes.unpickleType(pickledType, args) given qctx.tasty.rootContext.asInstanceOf[Context]
21+
PickledQuotes.unpickleType(pickledType, args) given this.tasty.rootContext.asInstanceOf[Context]
2222
).asInstanceOf[Type[T]]
2323
}
2424

library/src/scala/quoted/QuoteContext.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ trait QuoteContext {
5353

5454
/** Unpickle `pickledExpr` which represents a pickled `Expr` tree
5555
*/
56-
private[scala] def unpickleExpr[T](pickledExpr: PickledExpr, args: PickledExprArgs): given QuoteContext => Expr[T]
56+
private[scala] def unpickleExpr[T](pickledExpr: PickledExpr, args: PickledExprArgs): Expr[T]
5757

5858
/** Unpickle `pickledType` which represents a pickled `Type` tree
5959
*/
60-
private[scala] def unpickleType[T](pickledType: PickledType, args: PickledTypeArgs): given QuoteContext => Type[T]
60+
private[scala] def unpickleType[T](pickledType: PickledType, args: PickledTypeArgs): Type[T]
6161

6262
}
6363

0 commit comments

Comments
 (0)