From ca5c3295338260af6cc3f861e19685cb4cd1228a Mon Sep 17 00:00:00 2001 From: Araq Date: Mon, 23 Mar 2015 14:38:22 +0100 Subject: added missing test case --- tests/concepts/tvarconcept.nim | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tests/concepts/tvarconcept.nim diff --git a/tests/concepts/tvarconcept.nim b/tests/concepts/tvarconcept.nim new file mode 100644 index 000000000..e33686b05 --- /dev/null +++ b/tests/concepts/tvarconcept.nim @@ -0,0 +1,15 @@ + +# bug #2346 + +type RNG64 = concept var rng + rng.randomUint64() is uint64 + +proc randomInt*(rng: var RNG64; max: int): int = 4 + + +type MyRNG* = object + +proc randomUint64*(self: var MyRNG): uint64 = 4 + +var r = MyRNG() +echo r.randomInt(5) -- cgit 1.4.1-2-gfad0