t11634.nim 328 B

123456789101112131415161718
  1. discard """
  2. action: reject
  3. """
  4. type Foo = ref object
  5. val: int
  6. proc divmod(a, b: Foo): (Foo, Foo) =
  7. (
  8. Foo(val: a.val div b.val),
  9. Foo(val: a.val mod b.val)
  10. )
  11. block:
  12. let a {.compileTime.} = Foo(val: 2)
  13. let b {.compileTime.} = Foo(val: 3)
  14. let (c11634 {.compileTime.}, d11634 {.compileTime.}) = divmod(a, b)