tissues.nim 557 B

123456789101112131415161718192021222324252627282930313233343536373839
  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
  14. # bug #2703
  15. type
  16. fooObj[T] = object of RootObj
  17. bazObj[T] = object of fooObj[T]
  18. x: T
  19. var troz: fooObj[string]
  20. echo bazObj[string](troz).x
  21. # bug #14880
  22. type step = object
  23. exec: proc ()
  24. const pipeline = @[step()]
  25. let crash = pipeline[0]