parent
1655c04aa3
commit
2de90a14cb
1 changed files with 15 additions and 0 deletions
15
tests/concepts/t8012.nim
Normal file
15
tests/concepts/t8012.nim
Normal file
|
|
@ -0,0 +1,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
|
||||
Loading…
Add table
Add a link
Reference in a new issue