cast static method
Implementation
static StatementScope cast(ReferenceScope other) {
if (other is StatementScope) {
return other;
} else if (other is MiscStatementSubScope) {
return other.parent;
} else {
throw ArgumentError.value(
other, 'other', 'Not resolvable to a statement scope');
}
}