Compiler implementation of the D programming language.
Convert expression into a delegate.
Used to convert the argument to a lazy parameter.
Expression e
| argument to convert to a delegate |
Type t
| the type to be returned by the delegate |
Scope* sc
| context |
Look for references to variables in a scope enclosing the new function literal.
Essentially just calls checkNestedReference() for each variable reference in
e`.
Scope* sc
| context |
Expression e
| expression to check |
See if context s
is nested within context p
, meaning it p
is reachable at runtime by walking the static links. If any of the intervening contexts are function literals, make sure they are delegates.
Dsymbol s
| inner context |
Dsymbol p
| outer context |
© 1999–2019 The D Language Foundation
Licensed under the Boost License 1.0.
https://dlang.org/phobos/dmd_delegatize.html