Merge pull request #3330 from rtfeldman/expect-is-thunk

actually codegen expect
This commit is contained in:
Folkert de Vries 2022-06-26 15:42:52 +02:00 committed by GitHub
commit 5b77ccf66e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 64 additions and 5 deletions

View file

@ -2075,12 +2075,12 @@ impl Declarations {
index
}
pub fn push_expect(&mut self, loc_expr: Loc<Expr>) -> usize {
pub fn push_expect(&mut self, name: Symbol, loc_expr: Loc<Expr>) -> usize {
let index = self.declarations.len();
self.declarations.push(DeclarationTag::Expectation);
self.variables.push(Variable::BOOL);
self.symbols.push(Loc::at_zero(Symbol::ATTR_ATTR));
self.symbols.push(Loc::at_zero(name));
self.annotations.push(None);
self.expressions.push(loc_expr);