NESM icon indicating copy to clipboard operation
NESM copied to clipboard

Instantiating enums with ARC gives different error messages break tests

Open ringabout opened this issue 1 year ago • 0 comments

https://github.com/xomachine/NESM/blob/master/nesm/enums.nim checks whether an integer can be converted to a valid enum by comparing the stringifying of the enum with "(invalid data!)". However, ARC/ORC changes its behavior. Instantiating invalid enums now gives an empty string.

Solution:

  • add logics of checking empty strings for ARC/ORC
  • following the solution from https://forum.nim-lang.org/t/8188

ref https://github.com/nim-lang/Nim/issues/19006 ref https://github.com/nim-lang/Nim/pull/19972

ringabout avatar Aug 30 '22 08:08 ringabout