t8012.nim 211 B

12345678910111213141516
  1. type
  2. MyTypeCon = concept c
  3. c.counter is int
  4. MyType = object
  5. counter: int
  6. proc foo(conc: var MyTypeCon) =
  7. conc.counter.inc
  8. if conc.counter < 5:
  9. foo(conc)
  10. var x: MyType
  11. x.foo
  12. discard x.repr