fixes #4875
This commit is contained in:
parent
4e51b562d4
commit
7c0fa52bbd
2 changed files with 31 additions and 18 deletions
13
tests/template/tconfusinglocal.nim
Normal file
13
tests/template/tconfusinglocal.nim
Normal file
|
|
@ -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()
|
||||
Loading…
Add table
Add a link
Reference in a new issue