fix #6462
This commit is contained in:
parent
057d5789ba
commit
2ceee884fe
3 changed files with 27 additions and 2 deletions
23
tests/concepts/t6462.nim
Normal file
23
tests/concepts/t6462.nim
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
discard """
|
||||
output: "true"
|
||||
"""
|
||||
|
||||
import future
|
||||
|
||||
type
|
||||
FilterMixin*[T] = ref object
|
||||
test*: (T) -> bool
|
||||
trans*: (T) -> T
|
||||
|
||||
SeqGen*[T] = ref object
|
||||
fil*: FilterMixin[T]
|
||||
|
||||
WithFilter[T] = concept a
|
||||
a.fil is FilterMixin[T]
|
||||
|
||||
proc test*[T](a: WithFilter[T]): (T) -> bool =
|
||||
a.fil.test
|
||||
|
||||
var s = SeqGen[int](fil: FilterMixin[int](test: nil, trans: nil))
|
||||
echo s.test() == nil
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue