fixes #2404
This commit is contained in:
parent
94f2d639b1
commit
43228a704f
3 changed files with 20 additions and 13 deletions
|
|
@ -1,15 +1,9 @@
|
|||
discard """
|
||||
output: "5"
|
||||
"""
|
||||
|
||||
# bug #2346
|
||||
# bug #2346, bug #2404
|
||||
|
||||
type RNG64 = concept var rng
|
||||
rng.randomUint64() is uint64
|
||||
import mvarconcept
|
||||
|
||||
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)
|
||||
echo randomInt(5)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue