diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2013-12-30 07:14:43 -0800 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2013-12-30 07:14:43 -0800 |
commit | 49e9e468864c0e2315f03923ae771b24cf2140d6 (patch) | |
tree | 73cbb35a63fa32f9d3b0b19829cf4413656cd50b /src/compiler | |
parent | c0b96b65ae1c428e6a712b0b38c235b9cfdf8c39 (diff) | |
parent | 187d73ed1b69118b8062d9cb7ddf85e79b469309 (diff) | |
download | scala-49e9e468864c0e2315f03923ae771b24cf2140d6.tar.gz scala-49e9e468864c0e2315f03923ae771b24cf2140d6.tar.bz2 scala-49e9e468864c0e2315f03923ae771b24cf2140d6.zip |
Merge pull request #3292 from xeno-by/topic/duplicate-macro-args
duplicates arguments to macro typer APIs
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/reflect/macros/contexts/Typers.scala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler/scala/reflect/macros/contexts/Typers.scala b/src/compiler/scala/reflect/macros/contexts/Typers.scala index 4a1122b913..4fa7603305 100644 --- a/src/compiler/scala/reflect/macros/contexts/Typers.scala +++ b/src/compiler/scala/reflect/macros/contexts/Typers.scala @@ -24,7 +24,7 @@ trait Typers { // typechecking uses silent anyways (e.g. in typedSelect), so you'll only waste your time // I'd advise fixing the root cause: finding why the context is not set to report errors // (also see reflect.runtime.ToolBoxes.typeCheckExpr for a workaround that might work for you) - wrapper(callsiteTyper.silent(_.typed(tree, pt), reportAmbiguousErrors = false) match { + wrapper(callsiteTyper.silent(_.typed(universe.duplicateAndKeepPositions(tree), pt), reportAmbiguousErrors = false) match { case universe.analyzer.SilentResultValue(result) => macroLogVerbose(result) result @@ -46,7 +46,7 @@ trait Typers { universe.analyzer.inferImplicit(tree, viewTpe, true, callsiteTyper.context, silent, withMacrosDisabled, pos, (pos, msg) => throw TypecheckException(pos, msg)) } - def resetAllAttrs(tree: Tree): Tree = universe.resetAllAttrs(tree) + def resetAllAttrs(tree: Tree): Tree = universe.resetAllAttrs(universe.duplicateAndKeepPositions(tree)) - def resetLocalAttrs(tree: Tree): Tree = universe.resetLocalAttrs(tree) + def resetLocalAttrs(tree: Tree): Tree = universe.resetLocalAttrs(universe.duplicateAndKeepPositions(tree)) } |