add testcase for #8012 (#15785)

This commit is contained in:
flywind 2020-10-30 16:57:26 +08:00 • committed by GitHub
commit 2de90a14cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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