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)
|
if let Some((captures, capture_tuple)) = self.tys.captures_of(piter, f)
|
||||||
&& let Some(idx) = captures.iter().position(|&cid| cid.id == id)
|
&& let Some(idx) = captures.iter().position(|&cid| cid.id == id)
|
||||||
{
|
{
|
||||||
let ty = if captures[idx].is_ct {
|
if captures[idx].is_ct {
|
||||||
ty::Id::TYPE
|
let ty = self.tys.ins.args[capture_tuple.range().start + idx];
|
||||||
|
break Some(self.ci.nodes.new_const_lit(ty::Id::TYPE, ty));
|
||||||
} else {
|
} else {
|
||||||
self.tys.ins.args[capture_tuple.range().start + idx]
|
break Some(
|
||||||
};
|
Value::new(NEVER)
|
||||||
break Some(Value::new(NEVER).ty(ty));
|
.ty(self.tys.ins.args[capture_tuple.range().start + idx]),
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
piter = match self.tys.parent_of(piter) {
|
piter = match self.tys.parent_of(piter) {
|
||||||
|
|
Loading…
Reference in a new issue