aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dotty/tools/dotc/core/Decorators.scala3
-rw-r--r--src/dotty/tools/dotc/typer/InstChecks.scala3
2 files changed, 4 insertions, 2 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 {
diff --git a/src/dotty/tools/dotc/typer/InstChecks.scala b/src/dotty/tools/dotc/typer/InstChecks.scala
index 91c109ce8..7148a6e68 100644
--- a/src/dotty/tools/dotc/typer/InstChecks.scala
+++ b/src/dotty/tools/dotc/typer/InstChecks.scala
@@ -9,9 +9,10 @@ import Types._, Symbols._, Flags._, StdNames._
import util.Positions._
import ast.Trees._
import typer.ErrorReporting._
+import DenotTransformers._
/** This checks `New` nodes, verifying that they can be instantiated. */
-class InstChecks extends Phase {
+class InstChecks extends Phase with IdentityDenotTransformer {
import ast.tpd._
override def phaseName: String = "instchecks"