Index: src/pattern-rewriter.cc |
diff --git a/src/pattern-rewriter.cc b/src/pattern-rewriter.cc |
index a97c009708cdd1ffbb793654a1b5838339cf3e8c..5871740c14bf16a064c78f9c0c05fdddc228ff80 100644 |
--- a/src/pattern-rewriter.cc |
+++ b/src/pattern-rewriter.cc |
@@ -224,13 +224,11 @@ Variable* Parser::PatternRewriter::CreateTempVar(Expression* value) { |
void Parser::PatternRewriter::VisitObjectLiteral(ObjectLiteral* pattern) { |
auto temp = CreateTempVar(current_value_); |
- if (pattern->properties()->length() == 0) { |
- block_->AddStatement(descriptor_->parser->BuildAssertIsCoercible(temp), |
- zone()); |
- } |
+ |
+ block_->AddStatement(descriptor_->parser->BuildAssertIsCoercible(temp), |
+ zone()); |
for (ObjectLiteralProperty* property : *pattern->properties()) { |
- // TODO(dslomov): computed property names. |
RecurseIntoSubpattern( |
property->value(), |
factory()->NewProperty(factory()->NewVariableProxy(temp), |