File tree Expand file tree Collapse file tree 3 files changed +15
-1
lines changed
compiler/src/dotty/tools/dotc/transform/patmat Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -613,9 +613,9 @@ object SpaceEngine {
613
613
case OrType (tp1, tp2) => List (tp1, tp2)
614
614
case tp if tp.isRef(defn.BooleanClass ) => List (ConstantType (Constant (true )), ConstantType (Constant (false )))
615
615
case tp if tp.isRef(defn.UnitClass ) => ConstantType (Constant (())) :: Nil
616
- case tp if tp.classSymbol.isAllOf(JavaEnumTrait ) => tp.classSymbol.children.map(_.termRef)
617
616
case tp @ NamedType (Parts (parts), _) => parts.map(tp.derivedSelect)
618
617
case _ : SingletonType => ListOfNoType
618
+ case tp if tp.classSymbol.isAllOf(JavaEnumTrait ) => tp.classSymbol.children.map(_.termRef)
619
619
620
620
case tp @ AppliedType (Parts (parts), targs) if tp.classSymbol.children.isEmpty =>
621
621
// It might not obvious that it's OK to apply the type arguments of a parent type to child types.
Original file line number Diff line number Diff line change
1
+ public enum ParameterModifier {
2
+ Repeated ,
3
+ Plain ,
4
+ ByName ;
5
+
6
+ private ParameterModifier () {
7
+ }
8
+ }
Original file line number Diff line number Diff line change
1
+ class Test :
2
+ private def showParameterModifier (base : String , pm : ParameterModifier ): String = pm match {
3
+ case ParameterModifier .Plain => base
4
+ case ParameterModifier .Repeated => base + " *"
5
+ case ParameterModifier .ByName => " => " + base
6
+ }
You can’t perform that action at this time.
0 commit comments