aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Decorators.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-04-13 16:43:49 +0200
committerMartin Odersky <odersky@gmail.com>2015-04-13 17:28:24 +0200
commit35717b7d3029a87a4ec7c9b45d18644b33b560e8 (patch)
tree73c67082c47f7e7d9cd68d6b12bc23598c21e805 /src/dotty/tools/dotc/core/Decorators.scala
parent6571efa7ea1a5bd973ff010de6e38901cc77387b (diff)
downloaddotty-35717b7d3029a87a4ec7c9b45d18644b33b560e8.tar.gz
dotty-35717b7d3029a87a4ec7c9b45d18644b33b560e8.tar.bz2
dotty-35717b7d3029a87a4ec7c9b45d18644b33b560e8.zip
Allow future defs when printing with i"...".
We saw a failure of accessing a denotation outside its defined interval, which got triggered by i"...". This should never be the case. We should be more interested in what i"..." has to print. (V2, to see whether this builds with Travis now)
Diffstat (limited to 'src/dotty/tools/dotc/core/Decorators.scala')
-rw-r--r--src/dotty/tools/dotc/core/Decorators.scala3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/Decorators.scala b/src/dotty/tools/dotc/core/Decorators.scala
index 1ce834428..4e672ef40 100644
--- a/src/dotty/tools/dotc/core/Decorators.scala
+++ b/src/dotty/tools/dotc/core/Decorators.scala
@@ -7,6 +7,7 @@ import Contexts._, Names._, Phases._, printing.Texts._, printing.Printer, printi
import util.Positions.Position, util.SourcePosition
import collection.mutable.ListBuffer
import dotty.tools.dotc.transform.TreeTransforms._
+import typer.Mode
import scala.language.implicitConversions
/** This object provides useful implicit decorators for types defined elsewhere */
@@ -172,7 +173,7 @@ object Decorators {
def treatSingleArg(arg: Any) : Any =
try
arg match {
- case arg: Showable => arg.show
+ case arg: Showable => arg.show(ctx.fresh.addMode(Mode.FutureDefsOK))
case _ => arg
}
catch {