@@ -96,7 +96,7 @@ object IntParamRef:
96
96
(intParamRef, that) match
97
97
case (thisRef : DFRef .TypeRef , thatRef : DFRef .TypeRef ) =>
98
98
thisRef.get.isSimilarTo(thatRef.get)
99
- case (thisInt : Int , thatInt : Int ) => thisInt == thatInt
99
+ case (thisInt : Int , thatInt : Int ) => thisInt == thatInt
100
100
case (thisRef : DFRef .TypeRef , thatInt : Int ) =>
101
101
thisRef.get.isSimilarTo(fakeConst(thatInt))
102
102
case (thisInt : Int , thatRef : DFRef .TypeRef ) =>
@@ -114,16 +114,16 @@ object IntParamRef:
114
114
,
115
115
json =>
116
116
json match
117
- case ujson.Str (s) => read[DFRef .TypeRef ](s)
118
117
case ujson.Num (n) => n.toInt
118
+ case ujson.Str (_) => read[DFRef .TypeRef ](json)
119
119
case _ => throw new IllegalArgumentException (s " Expected String or Int, got $json" )
120
120
)
121
121
end IntParamRef
122
122
123
123
extension (intCompanion : Int .type )
124
124
def unapply (intParamRef : IntParamRef )(using MemberGetSet ): Option [Int ] =
125
125
(intParamRef : @ unchecked) match
126
- case int : Int => Some (int)
126
+ case int : Int => Some (int)
127
127
case DFRef (dfVal : DFVal ) =>
128
128
dfVal.getConstData.asInstanceOf [Option [Option [BigInt ]]].flatten.map(_.toInt)
129
129
0 commit comments