mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-20 08:06:41 +00:00
Miscellaneous tuple simplifications (#857)
- Drop unnecessary special-casing of 0-tuples. - Drop unused constructor.
This commit is contained in:
1 parent
5aa958345b
commit
532948d9a5
3 files changed
+5
-44
No files matched your search
@@ -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