fixes #16359 [backport] (#16377)

(cherry picked from commit b87bcb6d92)
This commit is contained in:
Andreas Rumpf
2020-12-17 13:35:02 +01:00
committed by narimiran
parent a0d62e654a
commit 19440baa80

View File

@@ -114,7 +114,7 @@ proc osLastError*(): OSErrorCode {.sideEffect.} =
when defined(nimscript):
discard
elif defined(windows):
result = OSErrorCode(getLastError())
result = cast[OSErrorCode](getLastError())
else:
result = OSErrorCode(errno)
{.pop.}