Skip to content

[P1] Flow refinement derivation ignores signedness in branch constraints #22

@ngmachado

Description

@ngmachado

Problem

Branch refinement derivation uses unsigned u256 constant extraction/comparisons regardless of signed integer domain.

Evidence

  • Constant extraction into unsigned: src/ast/type_resolver/core/statement.zig:1313
  • Unsigned bounds logic over u256: src/ast/type_resolver/core/statement.zig:1320

Impact

Incorrect inferred bounds for signed variables (e.g., conditions involving negatives).

Acceptance Criteria

  • Signed and unsigned refinements are derived with correct domain semantics.
  • Add signed branch-refinement tests (i8/i16/i256 with negative literals).

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions