@@ -51,7 +51,7 @@ object PickledQuotes {
5151 }
5252
5353 /** Unpickle the tree contained in the TastyExpr */
54- def unpickleTerm (pickled : String | List [String ], typeHole : Int => Seq [Any ] => scala.quoted.Type [? ], termHole : Int => Seq [Any ] => scala.quoted.QuoteContext => scala.quoted.Expr [? ])(using Context ): Tree = {
54+ def unpickleTerm (pickled : String | List [String ], typeHole : ( Int , Seq [Any ]) => scala.quoted.Type [? ], termHole : ( Int , Seq [Any ], scala.quoted.QuoteContext ) => scala.quoted.Expr [? ])(using Context ): Tree = {
5555 val unpickled = withMode(Mode .ReadPositions )(unpickle(pickled, isType = false ))
5656 val Inlined (call, Nil , expnasion) = unpickled
5757 val inlineCtx = inlineContext(call)
@@ -61,13 +61,13 @@ object PickledQuotes {
6161 }
6262
6363 /** Unpickle the tree contained in the TastyType */
64- def unpickleTypeTree (pickled : String | List [String ], typeHole : Int => Seq [Any ] => scala.quoted.Type [? ], termHole : Int => Seq [Any ] => scala.quoted.QuoteContext => scala.quoted.Expr [? ])(using Context ): Tree = {
64+ def unpickleTypeTree (pickled : String | List [String ], typeHole : ( Int , Seq [Any ]) => scala.quoted.Type [? ], termHole : ( Int , Seq [Any ], scala.quoted.QuoteContext ) => scala.quoted.Expr [? ])(using Context ): Tree = {
6565 val unpickled = withMode(Mode .ReadPositions )(unpickle(pickled, isType = true ))
6666 spliceTypes(unpickled, typeHole, termHole)
6767 }
6868
6969 /** Replace all term holes with the spliced terms */
70- private def spliceTerms (tree : Tree , typeHole : Int => Seq [Any ] => scala.quoted.Type [? ], termHole : Int => Seq [Any ] => scala.quoted.QuoteContext => scala.quoted.Expr [? ])(using Context ): Tree = {
70+ private def spliceTerms (tree : Tree , typeHole : ( Int , Seq [Any ]) => scala.quoted.Type [? ], termHole : ( Int , Seq [Any ], scala.quoted.QuoteContext ) => scala.quoted.Expr [? ])(using Context ): Tree = {
7171 val evaluateHoles = new TreeMap {
7272 override def transform (tree : tpd.Tree )(using Context ): tpd.Tree = tree match {
7373 case Hole (isTerm, idx, args) =>
@@ -76,7 +76,7 @@ object PickledQuotes {
7676 else new scala.quoted.internal.Type (arg, QuoteContextImpl .scopeId)
7777 }
7878 if isTerm then
79- val quotedExpr = termHole(idx)( reifiedArgs)( dotty.tools.dotc.quoted.QuoteContextImpl ())
79+ val quotedExpr = termHole(idx, reifiedArgs, dotty.tools.dotc.quoted.QuoteContextImpl ())
8080 val filled = PickledQuotes .quotedExprToTree(quotedExpr)
8181
8282 // We need to make sure a hole is created with the source file of the surrounding context, even if
@@ -86,7 +86,7 @@ object PickledQuotes {
8686 else
8787 // Replaces type holes generated by PickleQuotes (non-spliced types).
8888 // These are types defined in a quote and used at the same level in a nested quote.
89- val quotedType = typeHole(idx)( reifiedArgs)
89+ val quotedType = typeHole(idx, reifiedArgs)
9090 PickledQuotes .quotedTypeToTree(quotedType)
9191 case tree : Select =>
9292 // Retain selected members
@@ -121,15 +121,15 @@ object PickledQuotes {
121121 }
122122
123123 /** Replace all type holes generated with the spliced types */
124- private def spliceTypes (tree : Tree , typeHole : Int => Seq [Any ] => scala.quoted.Type [? ], termHole : Int => Seq [Any ] => Any )(using Context ): Tree = {
124+ private def spliceTypes (tree : Tree , typeHole : ( Int , Seq [Any ]) => scala.quoted.Type [? ], termHole : ( Int , Seq [Int ], scala.quoted. QuoteContext ) => Any )(using Context ): Tree = {
125125 tree match
126126 case Block (stat :: rest, expr1) if stat.symbol.hasAnnotation(defn.InternalQuoted_QuoteTypeTagAnnot ) =>
127127 val typeSpliceMap = (stat :: rest).iterator.map {
128128 case tdef : TypeDef =>
129129 assert(tdef.symbol.hasAnnotation(defn.InternalQuoted_QuoteTypeTagAnnot ))
130130 val tree = tdef.rhs match
131131 case TypeBoundsTree (_, Hole (_, idx, args), _) =>
132- val quotedType = typeHole(idx)( args)
132+ val quotedType = typeHole(idx, args)
133133 PickledQuotes .quotedTypeToTree(quotedType)
134134 case TypeBoundsTree (_, tpt, _) =>
135135 tpt
0 commit comments