FuncDeclaration.getLevelAndCheck

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

class FuncDeclaration
final
int
getLevelAndCheck

Parameters

loc
Type: Loc

location for error messages

sc
Type: Scope*

context

fd

target of call

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