Use actual outer scope for function-bang calls.

This commit is contained in:
Stephen Chung
2021-11-14 22:48:57 +08:00
parent dc918447b6
commit 615c3acad6
7 changed files with 67 additions and 19 deletions

View File

@@ -1836,6 +1836,8 @@ impl FnCallHashes {
pub struct FnCallExpr {
/// Namespace of the function, if any.
pub namespace: Option<NamespaceRef>,
/// Function name.
pub name: Identifier,
/// Pre-calculated hashes.
pub hashes: FnCallHashes,
/// List of function call argument expressions.
@@ -1851,8 +1853,6 @@ pub struct FnCallExpr {
/// an [`Expr::DynamicConstant`] involves an additional allocation. Keeping the constant
/// values in an inlined array avoids these extra allocations.
pub constants: smallvec::SmallVec<[Dynamic; 2]>,
/// Function name.
pub name: Identifier,
/// Does this function call capture the parent scope?
pub capture_parent_scope: bool,
}