Disable warning about DotLikeOps

Give a clear compiler error when questionable
is used with the -d:nimPreviewDotLikeOps flag.

Reason: the option is likely to be deprecated
or removed. More info:
https://github.com/nim-lang/Nim/pull/19919
This commit is contained in:
Mark Spanbroek 2022-08-08 15:03:59 +02:00 committed by markspanbroek
parent 13c7ff7671
commit 22f2c9761a
3 changed files with 8 additions and 0 deletions

View File

@ -1,9 +1,14 @@
# Style Check
--styleCheck:usages --styleCheck:usages
if (NimMajor, NimMinor) < (1, 6): if (NimMajor, NimMinor) < (1, 6):
--styleCheck:hint --styleCheck:hint
else: else:
--styleCheck:error --styleCheck:error
# Disable some warnings
if (NimMajor, NimMinor) >= (1, 6):
switch("warning", "DotLikeOps:off")
# begin Nimble config (version 1) # begin Nimble config (version 1)
when fileExists("nimble.paths"): when fileExists("nimble.paths"):
include "nimble.paths" include "nimble.paths"

View File

@ -1,3 +1,4 @@
import ./questionable/dotlike
import ./questionable/options import ./questionable/options
export options export options

2
questionable/dotlike.nim Normal file
View File

@ -0,0 +1,2 @@
when defined(nimPreviewDotLikeOps):
{.error: "DotLikeOps are not supported by questionable".}