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

@@ -1801,7 +1801,7 @@ fn make_dot_expr(
// lhs.func!(...)
(_, Expr::FnCall(x, pos)) if x.capture_parent_scope => {
return Err(PERR::MalformedCapture(
"method-call style does not support capturing".into(),
"method-call style does not support running within the caller's scope".into(),
)
.into_err(pos))
}