Files
Nim/tests/template/tconfusinglocal.nim
Andreas Rumpf 06a8d37f9a fixes #5135
2016-12-21 11:09:47 +01:00

18 lines
267 B
Nim

# bug #5135
proc fail*[E](e: E): void =
raise newException(Exception, e)
# 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()