diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/reflect/scala/reflect/internal/TreeInfo.scala | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/reflect/scala/reflect/internal/TreeInfo.scala b/src/reflect/scala/reflect/internal/TreeInfo.scala index e1a18570b2..98c1afb323 100644 --- a/src/reflect/scala/reflect/internal/TreeInfo.scala +++ b/src/reflect/scala/reflect/internal/TreeInfo.scala @@ -261,22 +261,24 @@ abstract class TreeInfo { * in the position `for { <tree> <- expr }` based only * on information at the `parser` phase? To qualify, there * may be no subtree that will be interpreted as a - * Stable Identifier Pattern. + * Stable Identifier Pattern, nor any type tests, even + * on TupleN. See SI-6968. * * For instance: * * {{{ - * foo @ (bar, (baz, quux)) + * (foo @ (bar @ _)) = 0 * }}} * - * is a variable pattern; if the structure matches, - * then the remainder is inevitable. + * is a not a variable pattern; if only binds names. * * The following are not variable patterns. * * {{{ - * foo @ (bar, (`baz`, quux)) // back quoted ident, not at top level - * foo @ (bar, Quux) // UpperCase ident, not at top level + * `bar` + * Bar + * (a, b) + * _: T * }}} * * If the pattern is a simple identifier, it is always @@ -305,10 +307,6 @@ abstract class TreeInfo { tree match { case Bind(name, pat) => isVarPatternDeep0(pat) case Ident(name) => isVarPattern(tree) - case Apply(sel, args) => - ( isReferenceToScalaMember(sel, TupleClass(args.size).name.toTermName) - && (args forall isVarPatternDeep0) - ) case _ => false } } |