parent
b9b53b6ca1
commit
5ba5b5202a
3 changed files with 17 additions and 2 deletions
|
|
@ -1,3 +1,6 @@
|
|||
discard """
|
||||
output: '''uint'''
|
||||
"""
|
||||
|
||||
# Tests unsigned literals and implicit conversion between uints and ints
|
||||
# Passes if it compiles
|
||||
|
|
@ -43,3 +46,12 @@ block t4176:
|
|||
var yyy: uint8 = 0
|
||||
yyy = yyy - 127
|
||||
doAssert type(yyy) is uint8
|
||||
|
||||
# bug #13661
|
||||
|
||||
proc fun(): uint = cast[uint](-1)
|
||||
const x0 = fun()
|
||||
|
||||
echo typeof(x0)
|
||||
|
||||
discard $x0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue