Skip to content

exhaustiveness checking and trans fail on this pattern #2111

Closed
@nikomatsakis

Description

@nikomatsakis

This test case:

fn foo(a: option<uint>, b: option<uint>) {
  alt (a,b) {
    (some(a), some(b)) if a == b { }
    (some(_), none) |
    (none, some(_)) { }
  }
}

when compiled (1) does not fail exhaustiveness checking (it should) and (2) causes an option::get() failure in trans (possibly as a result of problem #1?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions