summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/enum/tambiguousoverloads.nim4
-rw-r--r--tests/enum/tpure_enums_conflict.nim1
-rw-r--r--tests/errmsgs/t8064.nim2
-rw-r--r--tests/lookups/tambiguousemit.nim2
-rw-r--r--tests/lookups/tambprocvar.nim4
-rw-r--r--tests/lookups/tambsym3.nim2
-rw-r--r--tests/macros/t23032_2.nim2
-rw-r--r--tests/pragmas/monoff1.nim1
-rw-r--r--tests/pragmas/tonoff1.nim8
-rw-r--r--tests/pragmas/tonoff2.nim14
10 files changed, 32 insertions, 8 deletions
diff --git a/tests/enum/tambiguousoverloads.nim b/tests/enum/tambiguousoverloads.nim
index aa75eaa91..12c78c848 100644
--- a/tests/enum/tambiguousoverloads.nim
+++ b/tests/enum/tambiguousoverloads.nim
@@ -9,7 +9,7 @@ block: # bug #21887
     EnumC = enum C
 
   doAssert typeof(EnumC(A)) is EnumC #[tt.Error
-                        ^ ambiguous identifier 'A' -- use one of the following:
+                        ^ ambiguous identifier: 'A' -- use one of the following:
   EnumA.A: EnumA
   EnumB.A: EnumB]#
 
@@ -21,6 +21,6 @@ block: # issue #22598
       red
 
   let a = red #[tt.Error
-          ^ ambiguous identifier 'red' -- use one of the following:
+          ^ ambiguous identifier: 'red' -- use one of the following:
   A.red: A
   B.red: B]#
diff --git a/tests/enum/tpure_enums_conflict.nim b/tests/enum/tpure_enums_conflict.nim
index 3c7528a72..4411fd2a6 100644
--- a/tests/enum/tpure_enums_conflict.nim
+++ b/tests/enum/tpure_enums_conflict.nim
@@ -1,4 +1,5 @@
 discard """
+  disabled: true # pure enums behave like overloaded enums on ambiguity now which gives a different error message
   errormsg: "ambiguous identifier: 'amb'"
   line: 19
 """
diff --git a/tests/errmsgs/t8064.nim b/tests/errmsgs/t8064.nim
index 6be83fd1a..c35a3abcc 100644
--- a/tests/errmsgs/t8064.nim
+++ b/tests/errmsgs/t8064.nim
@@ -5,5 +5,5 @@ values
 
 discard """
   # either this or "expression has no type":
-  errormsg: "ambiguous identifier 'values' -- use one of the following:"
+  errormsg: "ambiguous identifier: 'values' -- use one of the following:"
 """
diff --git a/tests/lookups/tambiguousemit.nim b/tests/lookups/tambiguousemit.nim
index 0ebd0a255..4f4bacce4 100644
--- a/tests/lookups/tambiguousemit.nim
+++ b/tests/lookups/tambiguousemit.nim
@@ -7,6 +7,6 @@ proc foo(x: int) = discard
 proc foo(x: float) = discard
 
 {.emit: ["// ", foo].} #[tt.Error
-                ^ ambiguous identifier 'foo' -- use one of the following:
+                ^ ambiguous identifier: 'foo' -- use one of the following:
   tambiguousemit.foo: proc (x: int){.noSideEffect, gcsafe.}
   tambiguousemit.foo: proc (x: float){.noSideEffect, gcsafe.}]#
diff --git a/tests/lookups/tambprocvar.nim b/tests/lookups/tambprocvar.nim
index 33323fbb2..f5c3fde4f 100644
--- a/tests/lookups/tambprocvar.nim
+++ b/tests/lookups/tambprocvar.nim
@@ -2,7 +2,7 @@ discard """
   action: reject
   cmd: "nim check $file"
   nimout: '''
-tambprocvar.nim(15, 11) Error: ambiguous identifier 'foo' -- use one of the following:
+tambprocvar.nim(15, 11) Error: ambiguous identifier: 'foo' -- use one of the following:
   tambprocvar.foo: proc (x: int){.noSideEffect, gcsafe.}
   tambprocvar.foo: proc (x: float){.noSideEffect, gcsafe.}
 '''
@@ -16,4 +16,4 @@ block:
 
 block:
   let x = `+` #[tt.Error
-           ^ ambiguous identifier '+' -- use one of the following:]#
+          ^ ambiguous identifier: '+' -- use one of the following:]#
diff --git a/tests/lookups/tambsym3.nim b/tests/lookups/tambsym3.nim
index 6e7589cd8..6bbebca10 100644
--- a/tests/lookups/tambsym3.nim
+++ b/tests/lookups/tambsym3.nim
@@ -1,5 +1,5 @@
 discard """
-  errormsg: "ambiguous identifier 'mDec' -- use one of the following:"
+  errormsg: "ambiguous identifier: 'mDec' -- use one of the following:"
   file: "tambsym3.nim"
   line: 11
 """
diff --git a/tests/macros/t23032_2.nim b/tests/macros/t23032_2.nim
index cb8e772e7..8dde29e10 100644
--- a/tests/macros/t23032_2.nim
+++ b/tests/macros/t23032_2.nim
@@ -1,6 +1,6 @@
 discard """
   action: "reject"
-  errormsg: "ambiguous identifier '%*'"
+  errormsg: "ambiguous identifier: '%*'"
 """
 import std/macros
 
diff --git a/tests/pragmas/monoff1.nim b/tests/pragmas/monoff1.nim
new file mode 100644
index 000000000..85d6c57b3
--- /dev/null
+++ b/tests/pragmas/monoff1.nim
@@ -0,0 +1 @@
+proc on*() = discard
diff --git a/tests/pragmas/tonoff1.nim b/tests/pragmas/tonoff1.nim
new file mode 100644
index 000000000..20ba7def2
--- /dev/null
+++ b/tests/pragmas/tonoff1.nim
@@ -0,0 +1,8 @@
+# issue #23002
+
+import monoff1
+
+proc test() =
+  {.warning[ProveInit]: on.}
+
+test()
diff --git a/tests/pragmas/tonoff2.nim b/tests/pragmas/tonoff2.nim
new file mode 100644
index 000000000..9dff5ef11
--- /dev/null
+++ b/tests/pragmas/tonoff2.nim
@@ -0,0 +1,14 @@
+discard """
+    action: compile
+"""
+
+# issue #22841
+
+import unittest
+
+proc on() =
+    discard
+
+suite "some suite":
+    test "some test":
+        discard