Fix warning in Nim 1.2.6

This commit is contained in:
Mark Spanbroek 2021-03-07 13:01:52 +01:00
parent 1b47843012
commit fe8acac2cd
2 changed files with 2 additions and 2 deletions

View File

@ -34,7 +34,7 @@ template `=?`*[T](name: untyped{nkIdent}, option: ?T): bool =
template liftPrefix(_: type Option, operator: untyped) =
template `operator`*(a: ?typed): ?typed =
type T = type(`operator`(a.unsafeGet))
type T {.used.} = type(`operator`(a.unsafeGet))
if x =? a:
`operator`(x).some
else:

View File

@ -37,7 +37,7 @@ template `=?`*[T](name: untyped{nkIdent}, value: ?!T): bool =
template liftPrefix(_: type Result, operator: untyped) =
template `operator`*(a: ?!typed): ?!typed =
type T = type(`operator`(a.unsafeGet))
type T {.used.} = type(`operator`(a.unsafeGet))
if x =? a:
`operator`(x).success
else: