diff options
Diffstat (limited to 'tests/reject/tadrdisc.nim')
-rwxr-xr-x | tests/reject/tadrdisc.nim | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/tests/reject/tadrdisc.nim b/tests/reject/tadrdisc.nim deleted file mode 100755 index 0e0324562..000000000 --- a/tests/reject/tadrdisc.nim +++ /dev/null @@ -1,23 +0,0 @@ -discard """ - file: "tadrdisc.nim" - line: 20 - errormsg: "for a \'var\' type a variable needs to be passed" -""" -# Test that the address of a dicriminants cannot be taken - -type - TKind = enum ka, kb, kc - TA = object - case k: TKind - 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 - - - |