add testcase for #8012 (#15785)

This commit is contained in:
flywind
2020-10-30 16:57:26 +08:00
committed by GitHub
parent 1655c04aa3
commit 2de90a14cb

15
tests/concepts/t8012.nim Normal file
View 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