Scope.isFromSpeculativeSemanticContext

dmd relies on mutation of state during semantic analysis, however sometimes semantic is being performed in a speculative context that should not have any visible effect on the rest of the compilation: for example when compiling a typeof() or __traits(compiles).

struct Scope
extern (D) @safe @nogc pure nothrow const scope
bool
isFromSpeculativeSemanticContext
()

Return Value

Type: bool

true if this Scope is known to be from one of these speculative contexts

Meta