mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 15:41:04 +01:00
Miscellaneous tuple simplifications (#857)
- Drop unnecessary special-casing of 0-tuples. - Drop unused constructor.
This commit is contained in:
@@ -109,12 +109,6 @@ class TuplePattern : public Pattern {
|
||||
TuplePattern(SourceLocation loc, std::vector<Field> fields)
|
||||
: Pattern(Kind::TuplePattern, loc), fields(std::move(fields)) {}
|
||||
|
||||
// Converts tuple_literal to a TuplePattern, by wrapping each field in an
|
||||
// ExpressionPattern.
|
||||
//
|
||||
// REQUIRES: tuple_literal->Tag() == Expression::Kind::TupleLiteral
|
||||
TuplePattern(Nonnull<Arena*> arena, Nonnull<Expression*> tuple_literal);
|
||||
|
||||
static auto classof(const Pattern* pattern) -> bool {
|
||||
return pattern->Tag() == Kind::TuplePattern;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user