summary refs log tree commit diff stats
path: root/tests/ccgbugs/t5296.nim
blob: 8fbed35c4fdfc891bf294bf3b7f34646d9ef1583 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
discard """
cmd: "nim c -d:release $file"
output: '''1
-1'''
"""

proc bug() : void =
    var x = 0
    try:
        inc x
        raise new(Exception)
    except Exception:
        echo x

bug()

# bug #19051
type GInt[T] = int

var a = 1
echo -a