Skip to content

LLVM assert "Op types should be identical!" with iter_vec(fail){...} #2145

Closed
@jruderman

Description

@jruderman
fn iter_vec<T>(v: [T], f: fn(T)) { for v.each {|x| f(x); } }
fn main() { iter_vec(fail) {|i| if i % 2 == 1 { } }; }

rustc fails with:

Assertion failed: (C1->getType() == C2->getType() && "Op types should be identical!"), function getCompare, file /Users/jruderman/code/rust/src/llvm/lib/VMCore/Constants.cpp, line 1705.

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