Fix constant folding of len() with concept type (#8143)

Fixes #7952
This commit is contained in:
LemonBoy 2018-06-30 13:43:55 +02:00 • committed by Andreas Rumpf
commit eec239e851
2 changed files with 18 additions and 6 deletions

12
tests/concepts/t7952.nim Normal file
View 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])