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] =>
160
160
161
161
/** Is tree a variable pattern? */
162
162
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)
164
164
case _ => false
165
165
}
166
166
Original file line number Diff line number Diff line change @@ -79,8 +79,8 @@ object NameOps {
79
79
case name : SimpleName => name.exists(isOperatorPart)
80
80
case _ => false
81
81
82
- /** Is name a variable name ? */
83
- def isVariableName : Boolean =
82
+ /** Is name of a variable pattern ? */
83
+ def isVarPattern : Boolean =
84
84
testSimple { n =>
85
85
n.length > 0 && {
86
86
val first = n.head
Original file line number Diff line number Diff line change @@ -2594,7 +2594,7 @@ object Parsers {
2594
2594
val givenMod = atSpan(in.skipToken())(Mod .Given ())
2595
2595
atSpan(in.offset) {
2596
2596
in.token match {
2597
- case IDENTIFIER | USCORE if in.name.isVariableName =>
2597
+ case IDENTIFIER | USCORE if in.name.isVarPattern =>
2598
2598
val name = in.name
2599
2599
in.nextToken()
2600
2600
accept(COLON )
Original file line number Diff line number Diff line change @@ -194,7 +194,7 @@ object PatternMatcher {
194
194
case Typed (_, tpt) if tpt.tpe.isRepeatedParam => true
195
195
case Bind (nme.WILDCARD , WildcardPattern ()) => true // don't skip when binding an interesting symbol!
196
196
case t if isWildcardArg(t) => true
197
- case x : Ident => x.name.isVariableName && ! isBackquoted(x)
197
+ case x : Ident => x.name.isVarPattern && ! isBackquoted(x)
198
198
case Alternative (ps) => ps.forall(unapply)
199
199
case EmptyTree => true
200
200
case _ => false
You can’t perform that action at this time.
0 commit comments