fixes #16359 [backport] (#16377)

This commit is contained in:
Andreas Rumpf 2020-12-17 13:35:02 +01:00 • committed by GitHub
commit b87bcb6d92
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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