We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 363c0d6 commit 38a27dbCopy full SHA for 38a27db
compiler/test/dotty/tools/dotc/SettingsTests.scala
@@ -165,6 +165,18 @@ class SettingsTests {
165
assertEquals(expectedErrors, summary.errors)
166
}
167
168
+ @Test def `Allow IntSetting's to be set with a colon`: Unit =
169
+ object Settings extends SettingGroup:
170
+ val foo = IntSetting("-foo", "foo", 80)
171
+ import Settings._
172
+
173
+ val args = List("-foo:100")
174
+ val summary = processArguments(args, processAll = true)
175
+ assertTrue(s"Setting args errors:\n ${summary.errors.take(5).mkString("\n ")}", summary.errors.isEmpty)
176
+ withProcessedArgs(summary) {
177
+ assertEquals(100, foo.value)
178
+ }
179
180
private def withProcessedArgs(summary: ArgsSummary)(f: SettingsState ?=> Unit) = f(using summary.sstate)
181
182
extension [T](setting: Setting[T])
0 commit comments