aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Applications.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-09-18 17:30:04 +0200
committerDmitry Petrashko <dmitry.petrashko@gmail.com>2014-10-11 08:24:35 +0200
commit12a624a75d05372002e4308f4b2830847ca88d3e (patch)
treebd7b21e7b2f4bc2260b66cde151c8ae563541c85 /src/dotty/tools/dotc/typer/Applications.scala
parent117b643d0c20aebac6363057d4043ac2cbb817fe (diff)
downloaddotty-12a624a75d05372002e4308f4b2830847ca88d3e.tar.gz
dotty-12a624a75d05372002e4308f4b2830847ca88d3e.tar.bz2
dotty-12a624a75d05372002e4308f4b2830847ca88d3e.zip
Replace tree.withName with {tpd|untpd}.rename.tree
Advantage: Can rename typed as well as untyped trees.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Applications.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Applications.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/typer/Applications.scala b/src/dotty/tools/dotc/typer/Applications.scala
index 2ff116f46..77298e610 100644
--- a/src/dotty/tools/dotc/typer/Applications.scala
+++ b/src/dotty/tools/dotc/typer/Applications.scala
@@ -594,7 +594,7 @@ trait Applications extends Compatibility { self: Typer =>
def followTypeAlias(tree: untpd.Tree): untpd.Tree = {
tree match {
case tree: untpd.RefTree =>
- val ttree = typedType(tree.withName(tree.name.toTypeName))
+ val ttree = typedType(untpd.rename(tree, tree.name.toTypeName))
ttree.tpe match {
case alias: TypeRef if alias.info.isAlias =>
companionRef(alias) match {