From 9da99f11035d94afba05f4bb768b3a9766b26faf Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Mon, 2 Nov 2015 11:45:28 +0100 Subject: Parentheses around a wildcard should not produce a lambda `(_)` and `(_: T)` should not be converted to functions x => x (x: T) => x --- src/dotty/tools/dotc/parsing/Parsers.scala | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/dotty/tools/dotc/parsing/Parsers.scala b/src/dotty/tools/dotc/parsing/Parsers.scala index 4b22eac95..caa15c7ff 100644 --- a/src/dotty/tools/dotc/parsing/Parsers.scala +++ b/src/dotty/tools/dotc/parsing/Parsers.scala @@ -322,6 +322,7 @@ object Parsers { case Ident(name1) => placeholderParams.nonEmpty && name1 == placeholderParams.head.name case Typed(t1, _) => isWildcard(t1) case Annotated(t1, _) => isWildcard(t1) + case Parens(t1) => isWildcard(t1) case _ => false } -- cgit v1.2.3