tunsafenew.nim 171 B

12345678910
  1. discard """
  2. errormsg: "conversion from int literal(-1) to Natural is invalid"
  3. """
  4. type
  5. Obj = object
  6. case b: bool
  7. else: discard
  8. var o: ref Obj
  9. unsafeNew(o, -1)