summary refs log blame commit diff stats
path: root/tests/concepts/t8012.nim
blob: ec2aa6e5c5e3fbfb906d4a3f3fc5d996e854c194 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15














                               
type
  MyTypeCon = concept c
    c.counter is int
  MyType = object
    counter: int

proc foo(conc: var MyTypeCon) =
  conc.counter.inc
  if conc.counter < 5:
    foo(conc)

var x: MyType

x.foo
discard x.repr