summary refs log tree commit diff stats
path: root/tests/template/tconfusinglocal.nim
blob: 50bf8f4b2b1dffbbd4be8b150977b5b57d6d1af5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# 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()