mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 22:02:23 +01:00
Switch Expression to use inheritance+cast (#712)
Co-authored-by: Geoff Romer <gromer@google.com>
This commit is contained in:
committed by
GitHub
co-authored by
Geoff Romer
parent
4e0307efbc
commit
dbcd6ad20d
@@ -123,7 +123,7 @@ auto Statement::MakeReturn(int line_num, const Expression* exp,
|
||||
s->line_num = line_num;
|
||||
if (exp == nullptr) {
|
||||
CHECK(is_omitted_exp);
|
||||
exp = Expression::MakeTupleLiteral(line_num, {});
|
||||
exp = global_arena->New<TupleLiteral>(line_num);
|
||||
}
|
||||
s->value = Return({.exp = exp, .is_omitted_exp = is_omitted_exp});
|
||||
return s;
|
||||
|
||||
Reference in New Issue
Block a user