@@ -49,9 +49,8 @@ object Parsers {
49
49
case InBlock extends Location (false , false , false )
50
50
case ElseWhere extends Location (false , false , false )
51
51
52
- @ sharable object ParamOwner extends Enumeration {
53
- val Class, Type, TypeParam, Def : Value = Value
54
- }
52
+ enum ParamOwner :
53
+ case Class , Type , TypeParam , Def
55
54
56
55
type StageKind = Int
57
56
object StageKind {
@@ -2927,7 +2926,7 @@ object Parsers {
2927
2926
* HkTypeParamClause ::= ‘[’ HkTypeParam {‘,’ HkTypeParam} ‘]’
2928
2927
* HkTypeParam ::= {Annotation} [‘+’ | ‘-’] (id [HkTypePamClause] | ‘_’) TypeBounds
2929
2928
*/
2930
- def typeParamClause (ownerKind : ParamOwner . Value ): List [TypeDef ] = inBrackets {
2929
+ def typeParamClause (ownerKind : ParamOwner ): List [TypeDef ] = inBrackets {
2931
2930
2932
2931
def variance (vflag : FlagSet ): FlagSet =
2933
2932
if ownerKind == ParamOwner .Def || ownerKind == ParamOwner .TypeParam then
@@ -2962,7 +2961,7 @@ object Parsers {
2962
2961
commaSeparated(() => typeParam())
2963
2962
}
2964
2963
2965
- def typeParamClauseOpt (ownerKind : ParamOwner . Value ): List [TypeDef ] =
2964
+ def typeParamClauseOpt (ownerKind : ParamOwner ): List [TypeDef ] =
2966
2965
if (in.token == LBRACKET ) typeParamClause(ownerKind) else Nil
2967
2966
2968
2967
/** ContextTypes ::= FunArgType {‘,’ FunArgType}
0 commit comments