parent
7ae9c4358e
commit
eec239e851
2 changed files with 18 additions and 6 deletions
12
tests/concepts/t7952.nim
Normal file
12
tests/concepts/t7952.nim
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
discard """
|
||||
output: 5
|
||||
"""
|
||||
|
||||
type
|
||||
HasLen = concept iter
|
||||
len(iter) is int
|
||||
|
||||
proc echoLen(x: HasLen) =
|
||||
echo len(x)
|
||||
|
||||
echoLen([1, 2, 3, 4, 5])
|
||||
Loading…
Add table
Add a link
Reference in a new issue