File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed
compiler/src/dotty/tools/dotc/config Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ object Settings {
2222 val OutputTag : ClassTag [AbstractFile ] = ClassTag (classOf [AbstractFile ])
2323
2424 class SettingsState (initialValues : Seq [Any ]) {
25- private var values = ArrayBuffer (initialValues : _* )
25+ private val values = ArrayBuffer (initialValues : _* )
2626 private var _wasRead : Boolean = false
2727
2828 override def toString : String = s " SettingsState(values: ${values.toList}) "
@@ -89,26 +89,26 @@ object Settings {
8989 def isDefaultIn (state : SettingsState ): Boolean = valueIn(state) == default
9090
9191 def legalChoices : String =
92- if ( choices.isEmpty) " "
93- else choices match {
94- case r : Range => s " ${r.head}.. ${r.last}"
95- case xs : List [? ] => xs.mkString( " , " )
92+ choices match {
93+ case xs if xs.isEmpty => " "
94+ case r : Range => s " ${r.head}.. ${r.last}"
95+ case xs : List [? ] => xs.toString
9696 }
9797
9898 def isLegal (arg : Any ): Boolean =
99- if ( choices.isEmpty)
100- arg match {
101- case _ : T => true
102- case _ => false
103- }
104- else choices match {
99+ choices match {
100+ case xs if xs.isEmpty =>
101+ arg match {
102+ case _ : T => true
103+ case _ => false
104+ }
105105 case r : Range =>
106106 arg match {
107107 case x : Int => r.head <= x && x <= r.last
108108 case _ => false
109109 }
110110 case xs : List [? ] =>
111- xs contains arg
111+ xs. contains( arg)
112112 }
113113
114114 def tryToSet (state : ArgsSummary ): ArgsSummary = {
You can’t perform that action at this time.
0 commit comments