aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Typer.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-12-30 16:06:34 +0100
committerGuillaume Martres <smarter@ubuntu.com>2016-01-18 16:49:16 +0100
commitc0b545be494bc53f9839c8301cdca71edeb620c7 (patch)
tree4ff0a9e473d7a63d8c11533331d6560412035781 /src/dotty/tools/dotc/typer/Typer.scala
parentdd733181fd943f5074af57b151da95df7c999fc9 (diff)
downloaddotty-c0b545be494bc53f9839c8301cdca71edeb620c7.tar.gz
dotty-c0b545be494bc53f9839c8301cdca71edeb620c7.tar.bz2
dotty-c0b545be494bc53f9839c8301cdca71edeb620c7.zip
Keep rhs of TypeDef in typed tree
This is important for IDEs who want to see the full tree. The tree now gets replaced by a TypeTree in PostTyper.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Typer.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Typer.scala3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/typer/Typer.scala b/src/dotty/tools/dotc/typer/Typer.scala
index 511a12ea7..008eab0fd 100644
--- a/src/dotty/tools/dotc/typer/Typer.scala
+++ b/src/dotty/tools/dotc/typer/Typer.scala
@@ -961,8 +961,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
val TypeDef(name, rhs) = tdef
checkLowerNotHK(sym, tdef.tparams.map(symbolOfTree), tdef.pos)
completeAnnotations(tdef, sym)
- val _ = typedType(rhs) // unused, typecheck only to remove from typedTree
- assignType(cpy.TypeDef(tdef)(name, TypeTree(sym.info), Nil), sym)
+ assignType(cpy.TypeDef(tdef)(name, typedType(rhs), Nil), sym)
}
def typedClassDef(cdef: untpd.TypeDef, cls: ClassSymbol)(implicit ctx: Context) = track("typedClassDef") {