diff options
Diffstat (limited to 'tests/concepts/t7952.nim')
-rw-r--r-- | tests/concepts/t7952.nim | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/concepts/t7952.nim b/tests/concepts/t7952.nim new file mode 100644 index 000000000..96ff47e4a --- /dev/null +++ b/tests/concepts/t7952.nim @@ -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]) |