diff options
author | flywind <43030857+xflywind@users.noreply.github.com> | 2021-02-08 02:46:07 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-08 09:46:07 +0100 |
commit | d447c0fe3f39114f0913df5804e5f7a3406d6edb (patch) | |
tree | a1ec482ca0b184819dc0fdffe463e53cf6959b72 /lib/pure/options.nim | |
parent | 4fac8af0c9408ee2a8d454693d17fd84067d24c3 (diff) | |
download | Nim-d447c0fe3f39114f0913df5804e5f7a3406d6edb.tar.gz |
use typeof instead type (#16962)
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 195da1008..8eedcd082 100644 --- a/lib/pure/options.nim +++ b/lib/pure/options.nim @@ -100,7 +100,7 @@ proc some*[T](val: T): Option[T] {.inline.} = var a = some("abc") b = some(42) - assert $type(a) == "Option[system.string]" + assert $typeof(a) == "Option[system.string]" assert b.isSome assert a.get == "abc" assert $b == "Some(42)" @@ -122,7 +122,7 @@ proc none*(T: typedesc): Option[T] {.inline.} = runnableExamples: var a = none(int) assert a.isNone - assert $type(a) == "Option[system.int]" + assert $typeof(a) == "Option[system.int]" # the default is the none type discard |