add captured symbols field to Closure

This commit is contained in:
Folkert 2020-10-15 16:08:35 +02:00
parent 6318f032df
commit b7e099a6c8
3 changed files with 9 additions and 1 deletions

View file

@ -814,6 +814,7 @@ fn canonicalize_pending_def<'a>(
closure_type: var_store.fresh(),
return_type: var_store.fresh(),
name: symbol,
captured_symbols: MutSet::default(),
recursive: Recursive::NotRecursive,
arguments: underscores,
loc_body: Box::new(body_expr),
@ -1013,6 +1014,7 @@ fn canonicalize_pending_def<'a>(
closure_type,
return_type,
name: *defined_symbol,
captured_symbols: MutSet::default(),
recursive: is_recursive,
arguments: arguments.clone(),
loc_body: body.clone(),
@ -1146,6 +1148,7 @@ fn canonicalize_pending_def<'a>(
closure_type,
return_type,
name: *defined_symbol,
captured_symbols: MutSet::default(),
recursive: is_recursive,
arguments: arguments.clone(),
loc_body: body.clone(),