File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/compiler/scala/tools/nsc/typechecker Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -345,7 +345,7 @@ trait Macros extends FastTrack with MacroRuntimes with Traces with Helpers {
345
345
new {
346
346
val universe : self.global.type = self.global
347
347
val callsiteTyper : universe.analyzer.Typer = typer.asInstanceOf [global.analyzer.Typer ]
348
- val expandee = universe.analyzer.macroExpanderAttachment(expandeeTree).original orElse expandeeTree
348
+ val expandee = universe.analyzer.macroExpanderAttachment(expandeeTree).original orElse duplicateAndKeepPositions( expandeeTree)
349
349
val macroRole = universe.analyzer.macroExpanderAttachment(expandeeTree).role
350
350
} with UnaffiliatedMacroContext {
351
351
val prefix = Expr [Nothing ](prefixTree)(TypeTag .Nothing )
@@ -403,8 +403,8 @@ trait Macros extends FastTrack with MacroRuntimes with Traces with Helpers {
403
403
val wrappedArgs = mapWithIndex(args)((arg, j) => {
404
404
val fingerprint = implParams(min(j, implParams.length - 1 ))
405
405
fingerprint match {
406
- case LiftedTyped => context.Expr [Nothing ](arg)(TypeTag .Nothing ) // TODO: SI-5752
407
- case LiftedUntyped => arg
406
+ case LiftedTyped => context.Expr [Nothing ](arg.duplicate )(TypeTag .Nothing ) // TODO: SI-5752
407
+ case LiftedUntyped => arg.duplicate
408
408
case _ => abort(s " unexpected fingerprint $fingerprint in $binding with paramss being $paramss " +
409
409
s " corresponding to arg $arg in $argss" )
410
410
}
You can’t perform that action at this time.
0 commit comments