Skip to content

i16 and i8 do not print negative values correctly #1337

Closed
@certik

Description

@certik
from ltypes import i8, i16, i32, i64
u: i64 = i64(-18)
print(u)
x: i32 = i32(-18)
print(x)
y: i16 = i16(-18)
print(y)
z: i8 = i8(-18)
print(z)

This prints:

$ PYTHONPATH=../src/runtime/ltypes python a.py
-18
-18
-18
-18
$ lpython a.py
-18
-18
65518
238

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions