cleanup index generation
This commit is contained in:
parent
eec18896b7
commit
c2da0e9b3d
8 changed files with 71 additions and 37 deletions
27
tests/objvariant/treassign.nim
Normal file
27
tests/objvariant/treassign.nim
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
discard """
|
||||
output: "SUCCESS"
|
||||
"""
|
||||
|
||||
type
|
||||
BasicNumber = object of RootObj
|
||||
value: float32
|
||||
RefChild* = ref object
|
||||
curr*: TokenObject
|
||||
Token* {.pure.} = enum
|
||||
foo,
|
||||
bar,
|
||||
TokenObject = object
|
||||
case kind*: Token
|
||||
of Token.foo:
|
||||
foo*: string
|
||||
of Token.bar:
|
||||
bar*: BasicNumber
|
||||
|
||||
|
||||
var t = RefChild()
|
||||
|
||||
t.curr = TokenObject(kind: Token.bar, bar: BasicNumber(value: 12.34))
|
||||
|
||||
t.curr = TokenObject(kind: Token.foo, foo: "foo")
|
||||
|
||||
echo "SUCCESS"
|
||||
Loading…
Add table
Add a link
Reference in a new issue