aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Namer.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-01-01 14:02:32 +0100
committerMartin Odersky <odersky@gmail.com>2014-01-01 14:10:20 +0100
commita5611f867c2b9e493d5f0497ddfb813b5daf347d (patch)
tree247e0111a0bd51311ce2caddcf4f8e119705354b /src/dotty/tools/dotc/typer/Namer.scala
parenta4395b48362b080dc4a896099d71ea90dc3b998c (diff)
downloaddotty-a5611f867c2b9e493d5f0497ddfb813b5daf347d.tar.gz
dotty-a5611f867c2b9e493d5f0497ddfb813b5daf347d.tar.bz2
dotty-a5611f867c2b9e493d5f0497ddfb813b5daf347d.zip
Reverting a change in `tpd` that would no longer be type-correct under dotty rules. (reverted from commit 50ab9f559ad36b916d24e733df3629994d239583)
We now admit `identity _` and, if the expected type is a function type, pass this type on to the function. If the expected type is not a function type, we pass on AnyFunctionProto.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Namer.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Namer.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/typer/Namer.scala b/src/dotty/tools/dotc/typer/Namer.scala
index 1e9914ae9..16e965823 100644
--- a/src/dotty/tools/dotc/typer/Namer.scala
+++ b/src/dotty/tools/dotc/typer/Namer.scala
@@ -484,7 +484,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)(rhsCtx), rhsProto).tpe.widen
+ def rhsType = adapt(typedAheadExpr(mdef.rhs, rhsProto)(rhsCtx), rhsProto).tpe.widen
def lhsType = fullyDefinedType(rhsType, "right-hand side", mdef.pos)
inherited orElse lhsType
}