Specialize bodies with body var, not function var

I'm surprised code generation worked so well without this, before...

Closes #2818
This commit is contained in:
Ayaz Hafiz 2022-04-13 18:35:50 -04:00
parent f39f7eda03
commit 41dd7d0b4d
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
3 changed files with 24 additions and 1 deletions

View file

@ -3859,6 +3859,7 @@ fn add_def_to_module<'a>(
// This is a top-level definition, so it cannot capture anything
captured_symbols: CapturedSymbols::None,
body,
body_var: def.expr_var,
// This is a 0-arity thunk, so it cannot be recursive
is_self_recursive: false,
};