FuncDeclaration.getLevelAndCheck

Determine lexical level difference from this to nested function fd. Issue error if this cannot call fd.

class FuncDeclaration
extern (D) final
int
getLevelAndCheck

Parameters

loc Loc

location for error messages

sc Scope*

context

fd FuncDeclaration

target of call

decl Declaration

The Declaration that triggered this check. Used to provide a better error message only.

Return Value

Type: int

0 same level >0 decrease nesting by number -1 increase nesting by 1 (fd is nested within 'this') LevelError error

Meta