From ceadf54d7649b8cc728fd0b6df966bbf28bf55bd Mon Sep 17 00:00:00 2001 From: Timothee Cour Date: Sun, 11 Apr 2021 07:25:41 -0500 Subject: 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 --- lib/system.nim | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/system.nim') diff --git a/lib/system.nim b/lib/system.nim index bd9ae2762..6e84aca66 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -123,6 +123,10 @@ proc defined*(x: untyped): bool {.magic: "Defined", noSideEffect, compileTime.} ## # Do here programmer friendly expensive sanity checks. ## # Put here the normal code +when defined(nimHasIterable): + type + iterable*[T] {.magic: IterableType.} ## Represents an expression that yields `T` + when defined(nimHashOrdinalFixed): type Ordinal*[T] {.magic: Ordinal.} ## Generic ordinal type. Includes integer, -- cgit 1.4.1-2-gfad0