Skip to content

Commit 7d3e807

Browse files
committed
Anchor the simple directive regex
1 parent a1c49fb commit 7d3e807

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
@@ -139,11 +139,11 @@ private val toolArg = raw"(?://|/\*| \*) ?(?i:(${ToolName.values.mkString("|")})
139139
// ================================================================================================
140140

141141
/** Directive to specify to vulpix the options to pass to Dotty */
142-
private val directiveOptionsArg = raw"//> using options (.*)".r.unanchored
143-
private val directiveJavacOptions = raw"//> using javacOpt (.*)".r.unanchored
144-
private val directiveTargetOptions = raw"//> using target.platform (jvm|scala-js)".r.unanchored
145-
private val directiveUnsupported = raw"//> using (scala) (.*)".r.unanchored
146-
private val directiveUnknown = raw"//> using (.*)".r.unanchored
142+
private val directiveOptionsArg = raw"//> using options (.*)".r
143+
private val directiveJavacOptions = raw"//> using javacOpt (.*)".r
144+
private val directiveTargetOptions = raw"//> using target.platform (jvm|scala-js)".r
145+
private val directiveUnsupported = raw"//> using (scala) (.*)".r
146+
private val directiveUnknown = raw"//> using (.*)".r
147147

148148
// Inspect the lines for compiler options of the form
149149
// `//> 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)