diff options
author | ringabout <43030857+ringabout@users.noreply.github.com> | 2023-11-14 14:15:44 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-14 07:15:44 +0100 |
commit | 0dc3513613f87beb6ab5a590360ced7c9d33b1e3 (patch) | |
tree | c013f0149196d324c2ec141b6cb135eb194cd430 /lib/pure/options.nim | |
parent | 52784f32bbb6c764eb67a1abdbbbd9f54dc6030e (diff) | |
download | Nim-0dc3513613f87beb6ab5a590360ced7c9d33b1e3.tar.gz |
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 <SirNickolas@users.noreply.github.com>
Diffstat (limited to 'lib/pure/options.nim')
-rw-r--r-- | lib/pure/options.nim | 4 |
1 files changed, 2 insertions, 2 deletions
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 |