summary refs log tree commit diff stats
path: root/tests/errmsgs
diff options
context:
space:
mode:
authorTimothee Cour <timothee.cour2@gmail.com>2020-03-20 01:28:03 -0700
committerGitHub <noreply@github.com>2020-03-20 09:28:03 +0100
commitdd362ab4c0f574f781fb450b479d9dda8ced1e63 (patch)
treebe5fc96f6c3ea2d221fbf951f74bf110ecb0bd52 /tests/errmsgs
parent55d3780b7bef2a171ee2a2e4ff856e5f91335b47 (diff)
downloadNim-dd362ab4c0f574f781fb450b479d9dda8ced1e63.tar.gz
fix #13538 sigmatch errors are now sorted (#13701)
* fix #13538 sigmatch now sorted and has reliable order

* re-enable tests that were disabled because of that bug

* fix remaining tests and un-disable 2 other tests that were affected by this bug
Diffstat (limited to 'tests/errmsgs')
-rw-r--r--tests/errmsgs/tsigmatch.nim14
-rw-r--r--tests/errmsgs/tsigmatch2.nim8
-rw-r--r--tests/errmsgs/tunknown_named_parameter.nim10
3 files changed, 16 insertions, 16 deletions
diff --git a/tests/errmsgs/tsigmatch.nim b/tests/errmsgs/tsigmatch.nim
index 6b85d1408..414c972c9 100644
--- a/tests/errmsgs/tsigmatch.nim
+++ b/tests/errmsgs/tsigmatch.nim
@@ -3,13 +3,13 @@ discard """
   nimout: '''
 tsigmatch.nim(111, 4) Error: type mismatch: got <A, string>
 but expected one of:
+proc f(a: A)
+  first type mismatch at position: 2
+  extra argument given
 proc f(b: B)
   first type mismatch at position: 1
   required type for b: B
   but expression 'A()' is of type: A
-proc f(a: A)
-  first type mismatch at position: 2
-  extra argument given
 
 expression: f(A(), "extra")
 tsigmatch.nim(125, 6) Error: type mismatch: got <tuple of (string, proc (){.gcsafe, locks: 0.})>
@@ -61,14 +61,14 @@ proc f(a1: string; a2: varargs[string]; a3: float; a4: var string)
 expression: f("asdf", "1", "2", "3", "4", 2.3, "bad")
 tsigmatch.nim(164, 4) Error: type mismatch: got <string, a0: int literal(12)>
 but expected one of:
-proc f(x: string; a0: var int)
-  first type mismatch at position: 2
-  required type for a0: var int
-  but expression 'a0 = 12' is immutable, not 'var'
 proc f(x: string; a0: string)
   first type mismatch at position: 2
   required type for a0: string
   but expression 'a0 = 12' is of type: int literal(12)
+proc f(x: string; a0: var int)
+  first type mismatch at position: 2
+  required type for a0: var int
+  but expression 'a0 = 12' is immutable, not 'var'
 
 expression: f(foo, a0 = 12)
 tsigmatch.nim(171, 7) Error: type mismatch: got <Mystring, string>
diff --git a/tests/errmsgs/tsigmatch2.nim b/tests/errmsgs/tsigmatch2.nim
index 4e95d3e1b..580743f3e 100644
--- a/tests/errmsgs/tsigmatch2.nim
+++ b/tests/errmsgs/tsigmatch2.nim
@@ -3,14 +3,14 @@ discard """
   nimout: '''
 tsigmatch2.nim(40, 14) Error: type mismatch: got <float64>
 but expected one of:
-proc foo(i: Foo): string
-  first type mismatch at position: 1
-  required type for i: Foo
-  but expression '1.2' is of type: float64
 proc foo(args: varargs[string, myproc]): string
   first type mismatch at position: 1
   required type for args: varargs[string]
   but expression '1.2' is of type: float64
+proc foo(i: Foo): string
+  first type mismatch at position: 1
+  required type for i: Foo
+  but expression '1.2' is of type: float64
 
 expression: foo(1.2)
 tsigmatch2.nim(46, 7) Error: type mismatch: got <int literal(1)>
diff --git a/tests/errmsgs/tunknown_named_parameter.nim b/tests/errmsgs/tunknown_named_parameter.nim
index e9be23068..b139310db 100644
--- a/tests/errmsgs/tunknown_named_parameter.nim
+++ b/tests/errmsgs/tunknown_named_parameter.nim
@@ -6,22 +6,22 @@ proc rsplit(s: string; sep: char; maxsplit: int = -1): seq[string]
   first type mismatch at position: 2
   required type for sep: char
   but expression '{':'}' is of type: set[char]
-proc rsplit(s: string; seps: set[char] = Whitespace; maxsplit: int = -1): seq[string]
-  first type mismatch at position: 3
-  unknown named parameter: maxsplits
 proc rsplit(s: string; sep: string; maxsplit: int = -1): seq[string]
   first type mismatch at position: 2
   required type for sep: string
   but expression '{':'}' is of type: set[char]
+proc rsplit(s: string; seps: set[char] = Whitespace; maxsplit: int = -1): seq[string]
+  first type mismatch at position: 3
+  unknown named parameter: maxsplits
 
 expression: rsplit("abc:def", {':'}, maxsplits = 1)
 '''
-disabled: 32bit
 """
 
+
 # bug #8043
 
-# disabled on 32 bit systems because the order of suggested proc alternatives is different.
+
 
 import strutils
 "abc:def".rsplit({':'}, maxsplits = 1)