aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/ast/tpd.scala
diff options
context:
space:
mode:
authorGuillaume Martres <smarter@ubuntu.com>2017-02-13 04:04:21 +0100
committerGuillaume Martres <smarter@ubuntu.com>2017-02-13 23:42:18 +0100
commitf04f8db9143dab8960d4577974856ee9a62d5909 (patch)
treed9ef9e9321bbdba3949ea3b83de8f56b43de1014 /compiler/src/dotty/tools/dotc/ast/tpd.scala
parentb29783237c03ade1dd19cc564170c7a87d7b8b84 (diff)
downloaddotty-f04f8db9143dab8960d4577974856ee9a62d5909.tar.gz
dotty-f04f8db9143dab8960d4577974856ee9a62d5909.tar.bz2
dotty-f04f8db9143dab8960d4577974856ee9a62d5909.zip
TreeMap/TreeAccumulator: proper context for inlined trees
This was already be done in TreeTraverser but should also be done in TreeMap and TreeAccumulator for ctx.error(..., tree.pos) to not use completely incorrect positions inside inlined trees.
Diffstat (limited to 'compiler/src/dotty/tools/dotc/ast/tpd.scala')
-rw-r--r--compiler/src/dotty/tools/dotc/ast/tpd.scala5
1 files changed, 1 insertions, 4 deletions
diff --git a/compiler/src/dotty/tools/dotc/ast/tpd.scala b/compiler/src/dotty/tools/dotc/ast/tpd.scala
index ed268fda7..d1d886c55 100644
--- a/compiler/src/dotty/tools/dotc/ast/tpd.scala
+++ b/compiler/src/dotty/tools/dotc/ast/tpd.scala
@@ -933,10 +933,7 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo {
/** A key to be used in a context property that tracks enclosing inlined calls */
private val InlinedCalls = new Property.Key[List[Tree]]
- /** A context derived form `ctx` that records `call` as innermost enclosing
- * call for which the inlined version is currently processed.
- */
- def inlineContext(call: Tree)(implicit ctx: Context): Context =
+ override def inlineContext(call: Tree)(implicit ctx: Context): Context =
ctx.fresh.setProperty(InlinedCalls, call :: enclosingInlineds)
/** All enclosing calls that are currently inlined, from innermost to outermost */