/tests/enum/

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