don't leave Deref bytecode for Code chunk (#2137)

Re-enter loop after pushing `CompiledExpressionPart::Deref`, so that it
isn't recoded for `CompiledExpressionPart::Code` as well.
This commit is contained in:
Gabor Greif
2020-08-18 17:54:34 +02:00
committed by GitHub
parent 7c1cd774ef
commit 30b9e69136

View File

@@ -454,6 +454,7 @@ where
Operation::Deref { .. } => {
flush_code_chunk!();
parts.push(CompiledExpressionPart::Deref);
continue;
}
_ => {
return Ok(None);
@@ -720,7 +721,7 @@ mod tests {
},
CompiledExpressionPart::Code(vec![35, 5]),
CompiledExpressionPart::Deref,
CompiledExpressionPart::Code(vec![6, 159])
CompiledExpressionPart::Code(vec![159])
],
need_deref: false
}