fixing the bug in previous commit
Signed-off-by: Jakub Doka <jakub.doka2@gmail.com>
This commit is contained in:
parent
af19f4e30d
commit
d220823d78
|
@ -851,12 +851,15 @@ impl<'a> Codegen<'a> {
|
|||
if let Some((captures, capture_tuple)) = self.tys.captures_of(piter, f)
|
||||
&& let Some(idx) = captures.iter().position(|&cid| cid.id == id)
|
||||
{
|
||||
let ty = if captures[idx].is_ct {
|
||||
ty::Id::TYPE
|
||||
if captures[idx].is_ct {
|
||||
let ty = self.tys.ins.args[capture_tuple.range().start + idx];
|
||||
break Some(self.ci.nodes.new_const_lit(ty::Id::TYPE, ty));
|
||||
} else {
|
||||
self.tys.ins.args[capture_tuple.range().start + idx]
|
||||
};
|
||||
break Some(Value::new(NEVER).ty(ty));
|
||||
break Some(
|
||||
Value::new(NEVER)
|
||||
.ty(self.tys.ins.args[capture_tuple.range().start + idx]),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
piter = match self.tys.parent_of(piter) {
|
||||
|
|
Loading…
Reference in a new issue