mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-20 14:25:23 +00:00
fixes #4875
This commit is contained in:
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()
|
||||
Reference in New Issue
Block a user