summary refs log tree commit diff stats
path: root/tests/errmsgs
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2020-03-05 16:02:34 +0100
committerGitHub <noreply@github.com>2020-03-05 16:02:34 +0100
commit83e715c5b6b2501c02459398a2f394c457758a55 (patch)
tree2855c11dba5742de851dab4935881e03467b49ed /tests/errmsgs
parent62c113ebc7ba6fa1594b24158a6cc3e1170f4030 (diff)
downloadNim-83e715c5b6b2501c02459398a2f394c457758a55.tar.gz
fixes #5170 (#13589)
* fixes #5170

* make tests green
Diffstat (limited to 'tests/errmsgs')
-rw-r--r--tests/errmsgs/tsigmatch.nim6
-rw-r--r--tests/errmsgs/tsigmatch2.nim4
2 files changed, 5 insertions, 5 deletions
diff --git a/tests/errmsgs/tsigmatch.nim b/tests/errmsgs/tsigmatch.nim
index 21e2c217d..6b85d1408 100644
--- a/tests/errmsgs/tsigmatch.nim
+++ b/tests/errmsgs/tsigmatch.nim
@@ -98,13 +98,13 @@ expression: fun1(default(Mystring), "asdf")
 
 
 ## line 100
-block:
+when true:
   # bug #11061 Type mismatch error "first type mismatch at" points to wrong argument/position
   # Note: the error msg now gives correct position for mismatched argument
   type
     A = object of RootObj
     B = object of A
-
+block:
   proc f(b: B) = discard
   proc f(a: A) = discard
 
@@ -163,7 +163,7 @@ block:
   var foo = ""
   f(foo, a0 = 12)
 
-block:
+when true:
   type Mystring = string
   type MyInt = int
   proc fun1(a1: MyInt, a2: Mystring) = discard
diff --git a/tests/errmsgs/tsigmatch2.nim b/tests/errmsgs/tsigmatch2.nim
index c4eb4c197..4e95d3e1b 100644
--- a/tests/errmsgs/tsigmatch2.nim
+++ b/tests/errmsgs/tsigmatch2.nim
@@ -28,11 +28,11 @@ expression: foo 1
 
 
 # line 30
-
+type Foo = object
 block: # issue #13182
   proc myproc(a: int): string = $("myproc", a)
   proc foo(args: varargs[string, myproc]): string = $args
-  type Foo = object
+
   proc foo(i: Foo): string = "in foo(i)"
   static: doAssert foo(Foo()) == "in foo(i)"
   static: doAssert foo(1) == """["(\"myproc\", 1)"]"""