diff --git a/stew/objects.nim b/stew/objects.nim index b75f8d1..0777249 100644 --- a/stew/objects.nim +++ b/stew/objects.nim @@ -104,7 +104,7 @@ func checkedEnumAssign*[E: enum, I: SomeInteger](res: var E, value: I): bool = if value notin E: return false - res = E value + res = cast[E](value) return true func isZeroMemory*[T](x: T): bool =