Fix post-return compilation warning
This commit is contained in:
parent
ab3bd12c11
commit
53981fd70a
|
@ -1171,10 +1171,11 @@ proc fromPreserve*[T, E](v: var T; pr: Preserve[E]): bool {.gcsafe.} =
|
||||||
result = fromPreserveHook(v, pr)
|
result = fromPreserveHook(v, pr)
|
||||||
# a previous branch determined that the hook does not compile but
|
# a previous branch determined that the hook does not compile but
|
||||||
# calling it here explicitly produces a reasonable compiler error
|
# calling it here explicitly produces a reasonable compiler error
|
||||||
if not result:
|
when defined(tracePreserves):
|
||||||
trace T, " !- ", pr
|
if not result:
|
||||||
else:
|
trace T, " !- ", pr
|
||||||
trace T, " <- ", pr
|
else:
|
||||||
|
trace T, " <- ", pr
|
||||||
|
|
||||||
proc preserveTo*(pr: Preserve; T: typedesc): Option[T] =
|
proc preserveTo*(pr: Preserve; T: typedesc): Option[T] =
|
||||||
## Reverse of `toPreserve`.
|
## Reverse of `toPreserve`.
|
||||||
|
|
Loading…
Reference in New Issue