Fix tests some more
This commit is contained in:
parent
ee99771afa
commit
cb3c99fe1f
11 changed files with 22 additions and 25 deletions
|
|
@ -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) =
|
||||
|
||||
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
|
||||
|
||||
|
||||
|
||||
setKind(a.k)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue