mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 20:51:16 +01:00
Add array size deduction from tuple(fix#1590) (#2825)
Allow array size deduction from tuples and arrays on array declaration Closes #1590
This commit is contained in:
@@ -287,8 +287,11 @@ void Expression::Print(llvm::raw_ostream& out) const {
|
||||
}
|
||||
case ExpressionKind::ArrayTypeLiteral: {
|
||||
const auto& array_literal = cast<ArrayTypeLiteral>(*this);
|
||||
out << "[" << array_literal.element_type_expression() << "; "
|
||||
<< array_literal.size_expression() << "]";
|
||||
out << "[" << array_literal.element_type_expression() << ";";
|
||||
if (array_literal.has_size_expression()) {
|
||||
out << " " << array_literal.size_expression();
|
||||
}
|
||||
out << "]";
|
||||
break;
|
||||
}
|
||||
case ExpressionKind::IdentifierExpression:
|
||||
|
||||
Reference in New Issue
Block a user