Skip to content

Commit 61b32da

Browse files
tudorv91bishabosha
andauthored
Update compiler/src/dotty/tools/dotc/core/NameOps.scala
Co-authored-by: Jamie Thompson <bishbashboshjt@gmail.com>
1 parent 6aa176c commit 61b32da

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compiler/src/dotty/tools/dotc/core/NameOps.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,8 @@ object NameOps {
134134
}
135135

136136
/** Does the name match `extension`? */
137-
def isExtension: Boolean = name.toString == "extension"
137+
def isExtension: Boolean = name match
138+
case name: SimpleName => name.length == "extension".length && name.startsWith("extension")
138139

139140
/** Does this name start with `extension_`? */
140141
def isExtensionName: Boolean = name match

0 commit comments

Comments
 (0)