Skip to content

Commit f18117c

Browse files
committed
Vulpix simply adds language flags
1 parent 14fe66f commit f18117c

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

compiler/test/dotty/tools/vulpix/TestFlags.scala

+1-8
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,8 @@ final case class TestFlags(
2626
private val languageFeatureFlag = "-language:"
2727
private def withoutLanguageFeaturesOptions = options.filterNot(_.startsWith(languageFeatureFlag))
2828

29-
// TODO simplify to add `-language:feature` to `options` once
30-
// https://github.com/lampepfl/dotty/issues/9787 is implemented
3129
def andLanguageFeature(feature: String) =
32-
val (languageFeatures, rest) = options.partition(_.startsWith(languageFeatureFlag))
33-
val existingFeatures = languageFeatures.flatMap(_.stripPrefix(languageFeatureFlag).split(","))
34-
val featurePrefix =
35-
if existingFeatures.isEmpty then ""
36-
else existingFeatures.mkString(",") + ","
37-
copy(options = rest ++ Array(languageFeatureFlag + featurePrefix + feature))
30+
copy(options = options ++ Array(s"$languageFeatureFlag$feature"))
3831

3932
def withoutLanguageFeature(feature: String) =
4033
val (languageFeatures, rest) = options.partition(_.startsWith(languageFeatureFlag))

0 commit comments

Comments
 (0)