mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Fix drop_back call in scope_stack (#4099)
I found this through inspection, looking at an array stack data type. Tests pass either way, not sure what a good test would be for regressions (tests do fail if the size doesn't match, but either approach gets an appropriate size). But this is followed by `truncate(remaining_compile_time_bindings)`, so it seems like `drop_back` is a better match than `drop_front`.
This commit is contained in:
@@ -179,7 +179,7 @@ auto ScopeStack::Suspend() -> SuspendedScope {
|
||||
|
||||
// Move any compile-time bindings into the suspended scope.
|
||||
for (auto inst_id : llvm::ArrayRef(compile_time_binding_stack_)
|
||||
.drop_back(remaining_compile_time_bindings)) {
|
||||
.drop_front(remaining_compile_time_bindings)) {
|
||||
result.suspended_items.push_back(
|
||||
{.index = SuspendedScope::ScopeItem::IndexForCompileTimeBinding,
|
||||
.inst_id = inst_id});
|
||||
|
||||
Reference in New Issue
Block a user