From 0dc3513613f87beb6ab5a590360ced7c9d33b1e3 Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Tue, 14 Nov 2023 14:15:44 +0800 Subject: fixes #22932; treats closure iterators as pointers (#22934) fixes #22932 follow up https://github.com/nim-lang/Nim/pull/21629 --------- Co-authored-by: Nickolay Bukreyev --- lib/pure/options.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/pure/options.nim') diff --git a/lib/pure/options.nim b/lib/pure/options.nim index 10a46cc94..b7a6a6212 100644 --- a/lib/pure/options.nim +++ b/lib/pure/options.nim @@ -82,7 +82,7 @@ when defined(nimPreviewSlimSystem): when (NimMajor, NimMinor) >= (1, 1): type - SomePointer = ref | ptr | pointer | proc + SomePointer = ref | ptr | pointer | proc | iterator {.closure.} else: type SomePointer = ref | ptr | pointer @@ -90,7 +90,7 @@ else: type Option*[T] = object ## An optional type that may or may not contain a value of type `T`. - ## When `T` is a a pointer type (`ptr`, `pointer`, `ref` or `proc`), + ## When `T` is a a pointer type (`ptr`, `pointer`, `ref`, `proc` or `iterator {.closure.}`), ## `none(T)` is represented as `nil`. when T is SomePointer: val: T -- cgit 1.4.1-2-gfad0