aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/parsing/Parsers.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-09-23 14:52:32 +0200
committerMartin Odersky <odersky@gmail.com>2016-09-24 15:39:18 +0200
commit003ea0fba7d37156d890e0dae90f2ce765b08e04 (patch)
tree12eeb5e0352f13b188061f04bdc96cfd185e2803 /src/dotty/tools/dotc/parsing/Parsers.scala
parent28940d32d013c59df766841e04bc5240aeb5a210 (diff)
downloaddotty-003ea0fba7d37156d890e0dae90f2ce765b08e04.tar.gz
dotty-003ea0fba7d37156d890e0dae90f2ce765b08e04.tar.bz2
dotty-003ea0fba7d37156d890e0dae90f2ce765b08e04.zip
Fix isWildcard
Code inspection revealed that it did the wrong thing for annotated trees, looking in the annotation instead of in the argument.
Diffstat (limited to 'src/dotty/tools/dotc/parsing/Parsers.scala')
-rw-r--r--src/dotty/tools/dotc/parsing/Parsers.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/parsing/Parsers.scala b/src/dotty/tools/dotc/parsing/Parsers.scala
index a06930058..97213a685 100644
--- a/src/dotty/tools/dotc/parsing/Parsers.scala
+++ b/src/dotty/tools/dotc/parsing/Parsers.scala
@@ -339,7 +339,7 @@ object Parsers {
def isWildcard(t: Tree): Boolean = t match {
case Ident(name1) => placeholderParams.nonEmpty && name1 == placeholderParams.head.name
case Typed(t1, _) => isWildcard(t1)
- case Annotated(t1, _) => isWildcard(t1)
+ case t: Annotated => isWildcard(t.arg)
case Parens(t1) => isWildcard(t1)
case _ => false
}