parent
db6ffeba8e
commit
1850efbb6c
2 changed files with 36 additions and 0 deletions
23
tests/arc/dmodule.nim
Normal file
23
tests/arc/dmodule.nim
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
type
|
||||
MinKind* = enum
|
||||
minDictionary
|
||||
minBool
|
||||
MinValue* = object
|
||||
case kind*: MinKind
|
||||
of minDictionary:
|
||||
symbols: seq[MinOperator]
|
||||
else: discard
|
||||
MinOperator = object
|
||||
|
||||
# remove this inline pragma to make it compile
|
||||
proc `$`*(a: MinValue): string {.inline.} =
|
||||
case a.kind
|
||||
of minDictionary:
|
||||
result = "hello"
|
||||
for i in a.symbols:
|
||||
result = "hello"
|
||||
else: discard
|
||||
|
||||
proc parseMinValue*(): MinValue =
|
||||
# or this echo
|
||||
echo result
|
||||
13
tests/arc/t14383.nim
Normal file
13
tests/arc/t14383.nim
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
discard """
|
||||
cmd: "nim c --gc:arc $file"
|
||||
output: '''
|
||||
hello
|
||||
hello
|
||||
'''
|
||||
"""
|
||||
|
||||
import dmodule
|
||||
|
||||
var val = parseMinValue()
|
||||
if val.kind == minDictionary:
|
||||
echo val
|
||||
Loading…
Add table
Add a link
Reference in a new issue