diff options
author | Martin Odersky <odersky@gmail.com> | 2013-12-17 19:19:41 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-12-17 19:19:41 +0100 |
commit | 9a839d706291fdd57aeb48c3f64654afbd144a83 (patch) | |
tree | 1f3701eedc3b03920747f3833e08c93f545b3fa1 /src/dotty/tools/dotc/typer/Typer.scala | |
parent | c1c933d6f936a7975ca316c69d7639145eed36e7 (diff) | |
download | dotty-9a839d706291fdd57aeb48c3f64654afbd144a83.tar.gz dotty-9a839d706291fdd57aeb48c3f64654afbd144a83.tar.bz2 dotty-9a839d706291fdd57aeb48c3f64654afbd144a83.zip |
Three bugfixes to typing.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Typer.scala')
-rw-r--r-- | src/dotty/tools/dotc/typer/Typer.scala | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/typer/Typer.scala b/src/dotty/tools/dotc/typer/Typer.scala index 456a87ca4..7493fb42d 100644 --- a/src/dotty/tools/dotc/typer/Typer.scala +++ b/src/dotty/tools/dotc/typer/Typer.scala @@ -391,7 +391,7 @@ class Typer extends Namer with Applications with Implicits { typed(cpy.Block(tree, clsDef :: Nil, New(Ident(x), Nil)), pt) case _ => val tpt1 = typedType(tree.tpt) - val cls = checkClassTypeWithStablePrefix(tpt1.tpe, tpt1.pos) + val clsref = checkClassTypeWithStablePrefix(tpt1.tpe, tpt1.pos) // todo in a later phase: checkInstantiatable(cls, tpt1.pos) cpy.New(tree, tpt1).withType(tpt1.tpe) } @@ -717,7 +717,8 @@ class Typer extends Namer with Applications with Implicits { def typedBind(tree: untpd.Bind, pt: Type)(implicit ctx: Context): Bind = track("typedBind") { val body1 = typed(tree.body, pt) - val sym = ctx.newSymbol(ctx.owner, tree.name.asTermName, EmptyFlags, pt, coord = tree.pos) + // println(i"typed bind $tree pt = $pt bodytpe = ${body1.tpe}") + val sym = ctx.newSymbol(ctx.owner, tree.name.asTermName, EmptyFlags, body1.tpe, coord = tree.pos) cpy.Bind(tree, tree.name, body1) withType TermRef(NoPrefix, sym) } |