Files
pplus-library/mojo/probes/int-convert-narrow.mojo
T
alexm 568474d52f
Test (in pplus-core) / in-core (push) Failing after 28m44s
Initial commit
2026-11-12 22:23:48 -05:00

7 lines
248 B
Mojo

# probe: what does a conversion to a narrower whole-number type keep? (the low bits: Int8(300) is 44, UInt8(-1) is 255)
# expect-stdout: 44 44 255 4464
def main():
var n = 300
var m = -1
print(Int8(n), UInt8(n), UInt8(m), Int16(70000))