summary refs log blame commit diff stats
path: root/tests/template/tconfusinglocal.nim
blob: 9f641e2bf99082e7851feeeeb7ea7779b59768ea (plain) (tree)
1
2
3
4
5
6
7
8
9



           
 



                                  











                                                          
discard """
output: "0"
"""


# 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()