Skip to content

Commit db0e6c9

Browse files
committed
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.
1 parent 6571efa commit db0e6c9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/dotty/tools/dotc/core/Decorators.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import Contexts._, Names._, Phases._, printing.Texts._, printing.Printer, printi
77
import util.Positions.Position, util.SourcePosition
88
import collection.mutable.ListBuffer
99
import dotty.tools.dotc.transform.TreeTransforms._
10+
import typer.Mode
1011
import scala.language.implicitConversions
1112

1213
/** This object provides useful implicit decorators for types defined elsewhere */
@@ -172,7 +173,7 @@ object Decorators {
172173
def treatSingleArg(arg: Any) : Any =
173174
try
174175
arg match {
175-
case arg: Showable => arg.show
176+
case arg: Showable => arg.show(ctx.fresh.addMode(Mode.FutureDefsOK))
176177
case _ => arg
177178
}
178179
catch {

0 commit comments

Comments
 (0)