Query module DefaultArgumentReferencesNestedFunction

name
Default parameter references nested function
description
If a default parameter value references a function that is nested inside the function to which the parameter belongs, a runtime error will occur, since the function is not yet defined at the point where it is referenced.
kind
problem
problem.severity
error
id
js/nested-function-reference-in-default-parameter
tags
reliability correctness
precision
very-high

Imports

javascript

Provides classes for working with JavaScript programs, as well as JSON, YAML and HTML.

Predicates

accessToNestedFunction

Holds if va references function inner, which is nested inside function outer.