Skip to content

Integer literals exceeding i64 range are parsed as 0 instead of float #7388

@kokic

Description

@kokic

Description

A positive integer greater than the maximum value and a negative integer less than or equal to the minimum value cannot be represented as an integer literal, and are instead parsed as a float.

But

#sys.version

#(9223372036854775807) + 1 = #(9223372036854775808) \
#(-9223372036854775807) - 1 = #(-9223372036854775808)  \

will result in

0.14.0
9223372036854775807 + 1 = 0
−9223372036854775807 - 1 = 0

Note: Tests indicate that in version 0.13.x, integer literals exceeding the i64 range were correctly parsed as floats.

Reproduction URL

https://typst.app/project/rKXwApSkX5W9wsO4YznacB

Operating system

No response

Typst version

  • I am using the latest version of Typst

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingregressionSomething that did work before stopped working.urgentShould be fixed before the next release.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions