Skip to content

Lower scalar integer match statements through Whale #882

Closed

Description

@LunaStev

Motivation

At fd07427f4a976de05e38eff3ee1760db97fbb761 on Linux amd64 with Rust 1.89 and locked Whale 020d2a4, lexing, parsing and TypedProgram lowering succeed, but calling whale::emit_ir on this source returns Whale backend does not yet support this statement:

fun main() -> i32 { var x: i32 = 1; match (x) { 1 => { return 3; } _ => { return 0; } } }

Scope

Lower verified scalar integer match arms in whale/src/codegen/mod.rs using existing frontend matching semantics. Preserve source-order behavior, wildcard arms and control-flow termination. Variant payload matching remains separate from this initial scalar scope.

Difficulty: medium.

Completion criteria

  • Verify literal/wildcard arms and branch joins.
  • Cover returns and loop break/continue inside arms.
  • Keep unsupported aggregate/payload patterns explicit.

Activity

  1. added
    enhancement
    help wanted
    on Oct 7, 2026
  2. added a commit that references this issue on Oct 21, 2026
    42b65e4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementhelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions