Fix encapsulated environment in module functions.

This commit is contained in:
Stephen Chung
2022-01-30 17:27:13 +08:00
parent 8fc80ecd10
commit 7b92a80c32
13 changed files with 150 additions and 63 deletions

View File

@@ -3185,9 +3185,8 @@ fn parse_fn(
access,
params,
body,
lib: None,
#[cfg(not(feature = "no_module"))]
global: None,
environ: None,
#[cfg(not(feature = "no_function"))]
#[cfg(feature = "metadata")]
comments: if comments.is_empty() {
@@ -3341,9 +3340,8 @@ fn parse_anon_fn(
access: crate::FnAccess::Public,
params,
body: body.into(),
lib: None,
#[cfg(not(feature = "no_module"))]
global: None,
environ: None,
#[cfg(not(feature = "no_function"))]
#[cfg(feature = "metadata")]
comments: None,