Skip to content

Commit 88e70ac

Browse files
committed
fix reentrant warning
1 parent 7ac2fbc commit 88e70ac

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compiler/src/dotty/tools/dotc/config/CommandLineParser.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package dotty.tools.dotc
22
package config
33

44
import scala.annotation.tailrec
5+
import dotty.tools.sharable
56

67
/** A simple (overly so) command line parser.
78
* !!! This needs a thorough test suite to make sure quoting is
@@ -30,7 +31,7 @@ object CommandLineParser {
3031
}
3132
private object DoubleQuoted extends QuotedExtractor('"')
3233
private object SingleQuoted extends QuotedExtractor('\'')
33-
private val Word = """(\S+)(.*)""".r
34+
@sharable private val Word = """(\S+)(.*)""".r
3435

3536
// parse `in` for an argument, return it and the remainder of the input (or an error message)
3637
// (argument may be in single/double quotes, taking escaping into account, quotes are stripped)

0 commit comments

Comments
 (0)