mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 11:01:05 +01:00
Add TupleValue::Empty for the common empty tuple case (#708)
This commit is contained in:
@@ -759,8 +759,7 @@ void StepPattern() {
|
||||
if (act->pos == 0) {
|
||||
if (tuple.Fields().empty()) {
|
||||
frame->todo.Pop(1);
|
||||
frame->todo.Push(Action::MakeValAction(
|
||||
global_arena->New<TupleValue>(std::vector<TupleElement>())));
|
||||
frame->todo.Push(Action::MakeValAction(&TupleValue::Empty()));
|
||||
} else {
|
||||
const Pattern* p1 = tuple.Fields()[0].pattern;
|
||||
frame->todo.Push(Action::MakePatternAction(p1));
|
||||
|
||||
Reference in New Issue
Block a user