Skip to content

Incorrect parsing of INT64_MAX and INT64_MIN #1356

Open
@czgdp1807

Description

@czgdp1807

Example

from ltypes import i64

negu: i64 = i64(-9223372036854775808)
posu: i64 = i64(9223372036854775808)

AST

(Module [(ImportFrom ltypes [(i64 ())] 0) (AnnAssign (Name negu Store) (Name i64 Load) (Call (Name i64 Load) [(UnaryOp USub (ConstantInt 4611686019631184192 ()))] []) 1) (AnnAssign (Name posu Store) (Name i64 Load) (Call (Name i64 Load) [(ConstantInt 4611686019631184322 ())] []) 1)] [])

9223372036854775808 and -9223372036854775808 are getting parsed to 4611686019631184192.

Metadata

Metadata

Labels

ParserIssues or improvements related to parser

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions