version 0.8.2
This commit is contained in:
parent
581572b28c
commit
053309e60a
125 changed files with 6564 additions and 1308 deletions
16
tests/tadrdisc.nim
Executable file
16
tests/tadrdisc.nim
Executable file
|
|
@ -0,0 +1,16 @@
|
|||
# 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
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue