Skip to content

Smallest negative number is considered invalid#92

Description

@JaDogg

Describe the bug
For i16 minimum allowed value is -32768i16. However, if you use this value like below example it will fail

This error is thrown. (This error is accurate for positive numbers but not for negative numbers).

"32768" --> Integer literal out of range

To Reproduce

# Example code
def main() -> int:
    a: i16 = -32768i16
    0

Expected behaviour
No error should be thrown.

Screenshots
N/A

Desktop (please complete the following information):

  • OS:Windows
  • Version: 11
  • CPU - x86_64

Additional context
N/A

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions