瀏覽代碼

Fix compilation error on older Nim versions

Zed 4 年之前
父節點
當前提交
92ace2bf70
共有 1 個文件被更改,包括 6 次插入1 次删除
  1. 6 1
      config.nims

+ 6 - 1
config.nims

@@ -7,4 +7,9 @@
 # disable annoying warnings
 warning("GcUnsafe2", off)
 warning("ObservableStores", off)
-warning("HoleEnumConv", off)
+
+const
+  nimVersion = (major: NimMajor, minor: NimMinor, patch: NimPatch)
+
+when nimVersion >= (1, 6, 0):
+  warning("HoleEnumConv", off)