summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--lib/pure/includes/oserr.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pure/includes/oserr.nim b/lib/pure/includes/oserr.nim
index 138aa127d..673422973 100644
--- a/lib/pure/includes/oserr.nim
+++ b/lib/pure/includes/oserr.nim
@@ -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.}