fixes #2427
This commit is contained in:
parent
05e39cf6ad
commit
5bb3534f10
2 changed files with 16 additions and 2 deletions
14
tests/misc/tunsignedinc.nim
Normal file
14
tests/misc/tunsignedinc.nim
Normal file
|
|
@ -0,0 +1,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
|
||||
Loading…
Add table
Add a link
Reference in a new issue