summary refs log tree commit diff stats
path: root/tests/misc/tunsignedinc.nim
blob: 95622156f42d9f7671dc8c367f0b1b1829001b61 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
discard """
  output: '''253'''
"""

# bug #2427

import unsigned

var x = 0'u8
dec x # OverflowError
x -= 1 # OverflowError
x = x - 1 # No error

echo x