diff options
Diffstat (limited to 'tests/template/tconfusinglocal.nim')
-rw-r--r-- | tests/template/tconfusinglocal.nim | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/template/tconfusinglocal.nim b/tests/template/tconfusinglocal.nim new file mode 100644 index 000000000..9b2cdc954 --- /dev/null +++ b/tests/template/tconfusinglocal.nim @@ -0,0 +1,13 @@ + +# bug #4875 +type Bar = object + mFoo: int + +template foo(a: Bar): int = a.mFoo + +proc main = + let foo = 5 # Rename this to smth else to make it work + var b: Bar + echo b.foo + +main() |