Skip to content

A comprehension over a HashMap fails MIR lowering #2185

Closed

Description

@ehartford

Spec §4.3 comprehensions; D44 (for (k, v) in map binds &K/&V).

use std.collections
var m: HashMap[str, i32] = HashMap.new()
m.insert("a", 1)
let vs = [v * 2 for (k, v) in m]
print(vs.len())

Expected: 1.
Actual: MIR lowering failed for function main ... AST codegen was removed (no diagnostic naming the construct, which is also a loud-failure defect: the message names no node).

Activity

  1. ehartford commented on Oct 5, 2026

    @ehartford
    ContributorAuthor

    Fixed on main by stack #2196 (merged as efb765c), battery green on a21e326; the regression test for it landed with the fix.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions