Scopes
Last modified: 01 August 2024A scope acts as a container for declarations, including functions, properties, classes, and type aliases. When resolving a reference to a name, the compiler searches through a series of scopes to find the corresponding declaration. The order and types of scopes considered depend on the context of the reference.
In the Analysis API, scopes are visible through the KaScope
interface. To get a scope, use the scope utilities defined on classes and scripts.