summary refs log tree commit diff stats
path: root/tests/misc/twarningaserror.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/misc/twarningaserror.nim')
-rw-r--r--tests/misc/twarningaserror.nim35
1 files changed, 0 insertions, 35 deletions
diff --git a/tests/misc/twarningaserror.nim b/tests/misc/twarningaserror.nim
deleted file mode 100644
index 6f7b76095..000000000
--- a/tests/misc/twarningaserror.nim
+++ /dev/null
@@ -1,35 +0,0 @@
-discard """
-  joinable: false
-"""
-
-#[
-tests: hintAsError, warningAsError
-]#
-
-template fn1 =
-  {.hintAsError[ConvFromXtoItselfNotNeeded]:on.}
-  proc fn(a: string) = discard a.string
-  {.hintAsError[ConvFromXtoItselfNotNeeded]:off.}
-
-template fn2 =
-  {.hintAsError[ConvFromXtoItselfNotNeeded]:on.}
-  proc fn(a: string) = discard a
-  {.hintAsError[ConvFromXtoItselfNotNeeded]:off.}
-
-template gn1 =
-  {.warningAsError[ProveInit]:on.}
-  proc fn(): var int = discard
-  discard fn()
-  {.warningAsError[ProveInit]:off.}
-
-template gn2 =
-  {.warningAsError[ProveInit]:on.}
-  proc fn(): int = discard
-  discard fn()
-  {.warningAsError[ProveInit]:off.}
-
-doAssert not compiles(fn1())
-doAssert compiles(fn2())
-
-doAssert not compiles(gn1())
-doAssert compiles(gn2())