fixes #16359 [backport] (#16377)

This commit is contained in:
Andreas Rumpf
2020-12-17 13:35:02 +01:00
committed by GitHub
parent 979148e863
commit b87bcb6d92

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.}