trecursive_closure.nim 305 B

12345678910111213141516171819
  1. discard """
  2. action: compile
  3. """
  4. # bug #2233
  5. type MalType = object
  6. fun: proc: MalType
  7. proc f(x: proc: MalType) =
  8. discard x()
  9. f(nil)
  10. # bug #2823
  11. type A = object #of RootObj <-- Uncomment this to get no errors
  12. test: proc(i: A): bool
  13. var a: proc(i: A): bool # Or comment this line to get no errors