File tree Expand file tree Collapse file tree 4 files changed +5
-5
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 4 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -160,7 +160,7 @@ trait TreeInfo[T >: Untyped <: Type] { self: Trees.Instance[T] =>
160160
161161 /** Is tree a variable pattern? */
162162 def isVarPattern (pat : Tree ): Boolean = unsplice(pat) match {
163- case x : Ident => x.name.isVariableName && ! isBackquoted(x)
163+ case x : Ident => x.name.isVarPattern && ! isBackquoted(x)
164164 case _ => false
165165 }
166166
Original file line number Diff line number Diff line change @@ -79,8 +79,8 @@ object NameOps {
7979 case name : SimpleName => name.exists(isOperatorPart)
8080 case _ => false
8181
82- /** Is name a variable name ? */
83- def isVariableName : Boolean =
82+ /** Is name of a variable pattern ? */
83+ def isVarPattern : Boolean =
8484 testSimple { n =>
8585 n.length > 0 && {
8686 val first = n.head
Original file line number Diff line number Diff line change @@ -2594,7 +2594,7 @@ object Parsers {
25942594 val givenMod = atSpan(in.skipToken())(Mod .Given ())
25952595 atSpan(in.offset) {
25962596 in.token match {
2597- case IDENTIFIER | USCORE if in.name.isVariableName =>
2597+ case IDENTIFIER | USCORE if in.name.isVarPattern =>
25982598 val name = in.name
25992599 in.nextToken()
26002600 accept(COLON )
Original file line number Diff line number Diff line change @@ -194,7 +194,7 @@ object PatternMatcher {
194194 case Typed (_, tpt) if tpt.tpe.isRepeatedParam => true
195195 case Bind (nme.WILDCARD , WildcardPattern ()) => true // don't skip when binding an interesting symbol!
196196 case t if isWildcardArg(t) => true
197- case x : Ident => x.name.isVariableName && ! isBackquoted(x)
197+ case x : Ident => x.name.isVarPattern && ! isBackquoted(x)
198198 case Alternative (ps) => ps.forall(unapply)
199199 case EmptyTree => true
200200 case _ => false
You can’t perform that action at this time.
0 commit comments