Skip to content

[bug] codegen E2010: wasm local type conflict when i64 return immediately follows raise in try body #633

@Nymphium

Description

@Nymphium

Discovered nexus-dvr6.6 batch10. Specific shape:

let r = try
  raise SomeExn(...)
  return 0  // unreachable but typechecks
catch _ -> 1
end

triggers wasm codegen 'variable "__t2" has conflicting wasm local types' E2010. Sidestepped by moving the unreachable return past end.

Likely the LIR slot allocator doesn't handle the unreachable-after-raise path correctly: __t2 gets two type registrations from different branches that diverged via raise.

Acceptance: the inline shape compiles cleanly without local-type conflict.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions