failing test case preventing the use of --gc:v2: tsymchoicefield
This commit is contained in:
parent
d310b01db1
commit
e8c50640d7
3 changed files with 22 additions and 7 deletions
12
tests/template/tsymchoicefield.nim
Normal file
12
tests/template/tsymchoicefield.nim
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
type Foo = object
|
||||
len: int
|
||||
|
||||
var f = Foo(len: 40)
|
||||
|
||||
template getLen(f: Foo): expr = f.len
|
||||
|
||||
echo f.getLen
|
||||
# This fails, because `len` gets the nkOpenSymChoice
|
||||
# treatment inside the template early pass and then
|
||||
# it can't be recognized as a field anymore
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue