diff options
author | Martin Odersky <odersky@gmail.com> | 2016-09-23 14:52:32 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-09-24 15:39:18 +0200 |
commit | 003ea0fba7d37156d890e0dae90f2ce765b08e04 (patch) | |
tree | 12eeb5e0352f13b188061f04bdc96cfd185e2803 /src/dotty/tools/dotc | |
parent | 28940d32d013c59df766841e04bc5240aeb5a210 (diff) | |
download | dotty-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')
-rw-r--r-- | src/dotty/tools/dotc/parsing/Parsers.scala | 2 |
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 } |