From 22c5ff51ca4b72d5dab5756098d7ca8d66eaed9b Mon Sep 17 00:00:00 2001 From: Eric <5089238+emizzle@users.noreply.github.com> Date: Fri, 17 May 2024 09:45:03 +1000 Subject: [PATCH] remove enum forced scoping Forcing a scoping for a particular enum type would only resolve that type and not all enum types. --- serde/json/deserializer.nim | 6 ------ 1 file changed, 6 deletions(-) diff --git a/serde/json/deserializer.nim b/serde/json/deserializer.nim index 1aebff1..8f00d5a 100644 --- a/serde/json/deserializer.nim +++ b/serde/json/deserializer.nim @@ -338,12 +338,6 @@ proc fromJson*[T: ref object or object](_: type ?T, json: string): ?!Option[T] = # We can also be sure that these `fromJson` symbols can be overloaded where # needed. static: - type MyEnum = enum - one - - discard MyEnum.fromJson("") - discard Option[MyEnum].fromJson("") - discard seq[MyEnum].fromJson("") discard bool.fromJson("") discard Option[bool].fromJson("") discard seq[bool].fromJson("")