You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
iface monad<A> {
fn bind<B>(fn(A) -> self<B>);
}
impl monad<A> of monad<A> for [A] {
fn bind<B>(f: fn(A) -> [B]) {
let mut r = fail;
for self.each {|elt| r += f(elt); }
}
}
fn main() {
["hi"].bind {|x| [x] };
}
rustc fails with:
Assertion failed: (getOperand(0)->getType() == getOperand(1)->getType() && "Both operands to ICmp instruction are not of the same type!"), function ICmpInst, file /Users/jruderman/code/rust/src/llvm/include/llvm/Instructions.h, line 958.