aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc
diff options
context:
space:
mode:
authorNicolas Stucki <nicolas.stucki@gmail.com>2017-04-09 20:18:15 +0200
committerGitHub <noreply@github.com>2017-04-09 20:18:15 +0200
commit7294180d28dcbb3ba84ae302084a0806e76fa8a0 (patch)
treed27ac39667ad8fa335b2ba5fb008e5af52906c42 /compiler/src/dotty/tools/dotc
parent8d22a17c9bce4f730416f0d8e92dde61759b7181 (diff)
parent6e8ca801e53abdac645a19a3643c42558bce262a (diff)
downloaddotty-7294180d28dcbb3ba84ae302084a0806e76fa8a0.tar.gz
dotty-7294180d28dcbb3ba84ae302084a0806e76fa8a0.tar.bz2
dotty-7294180d28dcbb3ba84ae302084a0806e76fa8a0.zip
Merge pull request #2207 from dotty-staging/fix-#2188
Fix #2188: Do cbn transform also on Selects
Diffstat (limited to 'compiler/src/dotty/tools/dotc')
-rw-r--r--compiler/src/dotty/tools/dotc/transform/ElimByName.scala3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/src/dotty/tools/dotc/transform/ElimByName.scala b/compiler/src/dotty/tools/dotc/transform/ElimByName.scala
index 839552799..06c489029 100644
--- a/compiler/src/dotty/tools/dotc/transform/ElimByName.scala
+++ b/compiler/src/dotty/tools/dotc/transform/ElimByName.scala
@@ -112,6 +112,9 @@ class ElimByName extends MiniPhaseTransform with InfoTransformer { thisTransform
override def transformIdent(tree: Ident)(implicit ctx: Context, info: TransformerInfo): Tree =
applyIfFunction(tree, tree)
+ override def transformSelect(tree: Select)(implicit ctx: Context, info: TransformerInfo): Tree =
+ applyIfFunction(tree, tree)
+
override def transformTypeApply(tree: TypeApply)(implicit ctx: Context, info: TransformerInfo): Tree = tree match {
case TypeApply(Select(_, nme.asInstanceOf_), arg :: Nil) =>
// tree might be of form e.asInstanceOf[x.type] where x becomes a function.