Skip to content

Commit d7e627b

Browse files
committed
Anchor the simple directive regex
1 parent 4256bc8 commit d7e627b

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

compiler/test/dotty/tools/utils.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,11 @@ private val toolArg = raw"(?://|/\*| \*) ?(?i:(${ToolName.values.mkString("|")})
121121
// ================================================================================================
122122

123123
/** Directive to specify to vulpix the options to pass to Dotty */
124-
private val directiveOptionsArg = raw"//> using options (.*)".r.unanchored
125-
private val directiveJavacOptions = raw"//> using javacOpt (.*)".r.unanchored
126-
private val directiveTargetOptions = raw"//> using target.platform (jvm|scala-js)".r.unanchored
127-
private val directiveUnsupported = raw"//> using (scala) (.*)".r.unanchored
128-
private val directiveUnknown = raw"//> using (.*)".r.unanchored
124+
private val directiveOptionsArg = raw"//> using options (.*)".r
125+
private val directiveJavacOptions = raw"//> using javacOpt (.*)".r
126+
private val directiveTargetOptions = raw"//> using target.platform (jvm|scala-js)".r
127+
private val directiveUnsupported = raw"//> using (scala) (.*)".r
128+
private val directiveUnknown = raw"//> using (.*)".r
129129

130130
// Inspect the lines for compiler options of the form
131131
// `//> using options args`, `// scalajs: args`, `/* scalajs: args`, ` * scalajs: args` etc.

tests/pos/deferred-givens-singletons.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// //> using options -language:experimental.modularity -source future
1+
//> using options -language:experimental.modularity -source future
22
import compiletime.*
33

44
trait A:

0 commit comments

Comments
 (0)