From 0d4b3ed18edff5ae098be842a986cb32de651fbf Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Wed, 18 Oct 2023 22:44:13 +0800 Subject: fixes #22836; Unnecessary warning on 'options.none' with 'strictDefs'… (#22837) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit … enabled fixes #22836 --- lib/pure/options.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/pure/options.nim') diff --git a/lib/pure/options.nim b/lib/pure/options.nim index ec384ceb4..815eaab89 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>`_. -- cgit 1.4.1-2-gfad0 vel' selected='selected'>devel This repository contains the Nim compiler, Nim's stdlib, tools, and documentation. (mirror)ahoang <ahoang@tilde.institute>
summary refs log blame commit diff stats
path: root/lib/deprecated/pure/ospaths.nim
blob: 34d452fd2b5ea309df242556c7c5d0cc10b19b60 (plain) (tree)
1
2
3
4
5
6
7
8
9