summary refs log tree commit diff stats
path: root/tests/objvariant/tadrdisc.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/objvariant/tadrdisc.nim')
-rw-r--r--tests/objvariant/tadrdisc.nim13
1 files changed, 5 insertions, 8 deletions
diff --git a/tests/objvariant/tadrdisc.nim b/tests/objvariant/tadrdisc.nim
index 0e0324562..1afe7d04f 100644
--- a/tests/objvariant/tadrdisc.nim
+++ b/tests/objvariant/tadrdisc.nim
@@ -1,7 +1,7 @@
 discard """
   file: "tadrdisc.nim"
   line: 20
-  errormsg: "for a \'var\' type a variable needs to be passed"
+  errormsg: "type mismatch: got (TKind)"
 """
 # Test that the address of a dicriminants cannot be taken
 
@@ -12,12 +12,9 @@ type
     of ka: x, y: int
     of kb: a, b: string
     of kc: c, d: float
-    
-proc setKind(k: var TKind) = 
-  k = kc
-  
-var a: TA
-setKind(a.k) #ERROR_MSG for a 'var' type a variable needs to be passed
-
 
+proc setKind(k: var TKind) =
+  k = kc
 
+var a: TA
+setKind(a.k)