mirror of
https://github.com/logos-storage/questionable.git
synced 2026-01-09 01:03:13 +00:00
Fix warning in Nim 1.2.6
This commit is contained in:
parent
1b47843012
commit
fe8acac2cd
@ -34,7 +34,7 @@ template `=?`*[T](name: untyped{nkIdent}, option: ?T): bool =
|
|||||||
template liftPrefix(_: type Option, operator: untyped) =
|
template liftPrefix(_: type Option, operator: untyped) =
|
||||||
|
|
||||||
template `operator`*(a: ?typed): ?typed =
|
template `operator`*(a: ?typed): ?typed =
|
||||||
type T = type(`operator`(a.unsafeGet))
|
type T {.used.} = type(`operator`(a.unsafeGet))
|
||||||
if x =? a:
|
if x =? a:
|
||||||
`operator`(x).some
|
`operator`(x).some
|
||||||
else:
|
else:
|
||||||
|
|||||||
@ -37,7 +37,7 @@ template `=?`*[T](name: untyped{nkIdent}, value: ?!T): bool =
|
|||||||
template liftPrefix(_: type Result, operator: untyped) =
|
template liftPrefix(_: type Result, operator: untyped) =
|
||||||
|
|
||||||
template `operator`*(a: ?!typed): ?!typed =
|
template `operator`*(a: ?!typed): ?!typed =
|
||||||
type T = type(`operator`(a.unsafeGet))
|
type T {.used.} = type(`operator`(a.unsafeGet))
|
||||||
if x =? a:
|
if x =? a:
|
||||||
`operator`(x).success
|
`operator`(x).success
|
||||||
else:
|
else:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user