From 91d84e350f752d3a300c143d20cbbaf6bfb6d3c2 Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Wed, 18 Oct 2023 12:07:02 +0800 Subject: [PATCH] fixes #22836; Unnecessary warning on 'options.none' with 'strictDefs' enabled fixes #22836 --- lib/pure/options.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pure/options.nim b/lib/pure/options.nim index ec384ceb4ba38..815eaab8967d9 100644 --- a/lib/pure/options.nim +++ b/lib/pure/options.nim @@ -152,7 +152,7 @@ proc none*(T: typedesc): Option[T] {.inline.} = assert none(int).isNone # the default is the none type - discard + result = Option[T]() proc none*[T]: Option[T] {.inline.} = ## Alias for `none(T) <#none,typedesc>`_.