aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Namer.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-01-17 16:38:17 +0100
committerMartin Odersky <odersky@gmail.com>2014-01-17 16:38:17 +0100
commit422a33af1af13e3d389504e53a1be9a93b942be3 (patch)
tree377ea1a153776ade71cd1f9fdfd6eb49f4a1b116 /src/dotty/tools/dotc/typer/Namer.scala
parent2efd4f58a422ca7e308122e6fe9af0a530e10d67 (diff)
downloaddotty-422a33af1af13e3d389504e53a1be9a93b942be3.tar.gz
dotty-422a33af1af13e3d389504e53a1be9a93b942be3.tar.bz2
dotty-422a33af1af13e3d389504e53a1be9a93b942be3.zip
Make typedAhead adapt to prototype.
Not sure why it was different before. We need it at least to add implicit parameters in typedAheadExpr.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Namer.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Namer.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/typer/Namer.scala b/src/dotty/tools/dotc/typer/Namer.scala
index 5db557a93..2433c49b5 100644
--- a/src/dotty/tools/dotc/typer/Namer.scala
+++ b/src/dotty/tools/dotc/typer/Namer.scala
@@ -407,7 +407,7 @@ class Namer { typer: Typer =>
/** Typecheck tree during completion, and remember result in typedtree map */
private def typedAheadImpl(tree: Tree, pt: Type)(implicit ctx: Context): tpd.Tree =
- typedTree.getOrElseUpdate(expanded(tree), typer.typedUnadapted(tree, pt))
+ typedTree.getOrElseUpdate(expanded(tree), typer.typed(tree, pt))
def typedAheadType(tree: Tree, pt: Type = WildcardType)(implicit ctx: Context): tpd.Tree =
typedAheadImpl(tree, pt)(ctx retractMode Mode.PatternOrType addMode Mode.Type)
@@ -517,7 +517,7 @@ class Namer { typer: Typer =>
// println(s"final inherited for $sym: ${inherited.toString}") !!!
// println(s"owner = ${sym.owner}, decls = ${sym.owner.info.decls.show}")
val rhsCtx = ctx.fresh addMode Mode.InferringReturnType
- def rhsType = adapt(typedAheadExpr(mdef.rhs, rhsProto)(rhsCtx), rhsProto).tpe.widen
+ def rhsType = typedAheadExpr(mdef.rhs, rhsProto)(rhsCtx).tpe.widen
def lhsType = fullyDefinedType(rhsType, "right-hand side", mdef.pos)
inherited orElse lhsType
}