iterable[T] (#17196)

* fix failing test toSeq in manual which now works
* changelog
* reject proc fn(a: iterable)
* add iterable to spec
* remove MCS/UFCS limitation that now works
This commit is contained in:
Timothee Cour
2021-04-11 07:25:41 -05:00
committed by GitHub
parent a5b30c94c2
commit ceadf54d76
18 changed files with 254 additions and 40 deletions

View File

@@ -79,3 +79,9 @@ template whenVMorJs*(bodyIf, bodyElse) =
else:
when defined(js): bodyIf
else: bodyElse
template accept*(a) =
doAssert compiles(a)
template reject*(a) =
doAssert not compiles(a)