Skip to content

inferred literals and integer-const expressions aren't overflow checked #4220

Closed
@graydon

Description

@graydon

The most egregious example is: let x:u8 = 10_000; which compiles without complaint. But more generally, if we're going to make a promise to constant-fold the integer-constant grammar, we might well consider overflow checks on all those arithmetic nodes. Opinions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-type-systemArea: Type systemE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions