failing test case preventing the use of --gc:v2: tsymchoicefield

This commit is contained in:
Zahary Karadjov 2014-03-24 12:17:22 +02:00
commit e8c50640d7
3 changed files with 22 additions and 7 deletions

View 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