summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/system/gc.nim2
-rw-r--r--lib/system/gc_ms.nim2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/system/gc.nim b/lib/system/gc.nim
index 304eda19a..1f7164266 100644
--- a/lib/system/gc.nim
+++ b/lib/system/gc.nim
@@ -856,7 +856,7 @@ when not defined(useNimRtl):
     gch.cycleThreshold = InitialCycleThreshold
 
   proc GC_disableMarkAndSweep() =
-    gch.cycleThreshold = high(gch.cycleThreshold)-1
+    gch.cycleThreshold = high(typeof(gch.cycleThreshold))-1
     # set to the max value to suppress the cycle detector
 
   proc GC_fullCollect() =
diff --git a/lib/system/gc_ms.nim b/lib/system/gc_ms.nim
index 6683b9e34..852f5d7aa 100644
--- a/lib/system/gc_ms.nim
+++ b/lib/system/gc_ms.nim
@@ -507,7 +507,7 @@ when not defined(useNimRtl):
     gch.cycleThreshold = InitialThreshold
 
   proc GC_disableMarkAndSweep() =
-    gch.cycleThreshold = high(gch.cycleThreshold)-1
+    gch.cycleThreshold = high(typeof(gch.cycleThreshold))-1
     # set to the max value to suppress the cycle detector
 
   when defined(nimTracing):