aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/transform/PostTyper.scala
diff options
context:
space:
mode:
authorAllan Renucci <allan.renucci@gmail.com>2017-04-04 11:27:06 +0200
committerAllan Renucci <allan.renucci@gmail.com>2017-04-04 11:34:17 +0200
commitfee6953c75eb93956e4e33ff8351aa2ec992854c (patch)
treea05b67cbd81bd286cc16b3b072ba4c38bf5d7084 /compiler/src/dotty/tools/dotc/transform/PostTyper.scala
parent4aba4f798d2027a94b07631fd0589abe60eb644e (diff)
downloaddotty-fee6953c75eb93956e4e33ff8351aa2ec992854c.tar.gz
dotty-fee6953c75eb93956e4e33ff8351aa2ec992854c.tar.bz2
dotty-fee6953c75eb93956e4e33ff8351aa2ec992854c.zip
Addresses review comments
Diffstat (limited to 'compiler/src/dotty/tools/dotc/transform/PostTyper.scala')
-rw-r--r--compiler/src/dotty/tools/dotc/transform/PostTyper.scala10
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/src/dotty/tools/dotc/transform/PostTyper.scala b/compiler/src/dotty/tools/dotc/transform/PostTyper.scala
index 1a6ebb65d..9821757e8 100644
--- a/compiler/src/dotty/tools/dotc/transform/PostTyper.scala
+++ b/compiler/src/dotty/tools/dotc/transform/PostTyper.scala
@@ -2,7 +2,7 @@ package dotty.tools.dotc
package transform
import dotty.tools.dotc.transform.TreeTransforms.{TransformerInfo, TreeTransform, TreeTransformer}
-import dotty.tools.dotc.ast.{Trees, tpd}
+import dotty.tools.dotc.ast.{Trees, tpd, untpd}
import scala.collection.{ mutable, immutable }
import ValueClasses._
import scala.annotation.tailrec
@@ -258,15 +258,15 @@ class PostTyper extends MacroTransform with IdentityDenotTransformer { thisTran
)
case Import(expr, selectors) =>
val exprTpe = expr.tpe
- def checkIdent(ident: Ident): Unit = {
+ def checkIdent(ident: untpd.Ident): Unit = {
val name = ident.name.asTermName.encode
if (name != nme.WILDCARD && !exprTpe.member(name).exists && !exprTpe.member(name.toTypeName).exists)
ctx.error(s"${ident.name} is not a member of ${expr.show}", ident.pos)
}
selectors.foreach {
- case ident @ Ident(_) => checkIdent(ident)
- case Thicket((ident @ Ident(_)) :: _) => checkIdent(ident)
- case _ =>
+ case ident: untpd.Ident => checkIdent(ident)
+ case Thicket((ident: untpd.Ident) :: _) => checkIdent(ident)
+ case _ =>
}
super.transform(tree)
case tree =>