From 2de90a14cbc5182efad2cff63cd33f820e3a8832 Mon Sep 17 00:00:00 2001 From: flywind <43030857+xflywind@users.noreply.github.com> Date: Fri, 30 Oct 2020 16:57:26 +0800 Subject: add testcase for #8012 (#15785) --- tests/concepts/t8012.nim | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tests/concepts/t8012.nim (limited to 'tests/concepts/t8012.nim') diff --git a/tests/concepts/t8012.nim b/tests/concepts/t8012.nim new file mode 100644 index 000000000..ec2aa6e5c --- /dev/null +++ b/tests/concepts/t8012.nim @@ -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 -- cgit 1.4.1-2-gfad0