concept example from the manual now works again

This commit is contained in:
Araq 2015-03-23 11:18:02 +01:00
commit 3bcafb1c3a
5 changed files with 18 additions and 32 deletions

View file

@ -12,7 +12,6 @@ e
s
t
'''
disabled: "true"
"""
template accept(e: expr) =
@ -22,10 +21,10 @@ template reject(e: expr) =
static: assert(not compiles(e))
type
Container[T] = concept C
C.len is Ordinal
Container[T] = concept c
c.len is Ordinal
items(c) is iterator
for value in C:
for value in c:
type(value) is T
proc takesIntContainer(c: Container[int]) =