From b9f43c0711f8947ec9581489e291cb0ac3ecced2 Mon Sep 17 00:00:00 2001 From: Caio Lima Date: Mon, 11 Feb 2019 09:31:00 -0200 Subject: [PATCH] Adding destructuring-binding on feature list --- .../grammar-private-field-on-object-destructuring.case | 3 +-- .../grammar-private-field-on-object-destructuring.js | 3 +-- .../grammar-private-field-on-object-destructuring.js | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/class-elements/grammar-private-field-on-object-destructuring.case b/src/class-elements/grammar-private-field-on-object-destructuring.case index e2c9bc742a..63dd2e93e6 100644 --- a/src/class-elements/grammar-private-field-on-object-destructuring.case +++ b/src/class-elements/grammar-private-field-on-object-destructuring.case @@ -12,7 +12,7 @@ info: | {AssignmentPropertyList[?Yield, ?Await]} {AssignmentPropertyList[?Yield, ?Await],AssignmentRestProperty[?Yield, ?Await]opt} template: syntax/invalid -features: [class-fields-private] +features: [class-fields-private, destructuring-binding] ---*/ //- elements @@ -20,5 +20,4 @@ features: [class-fields-private] destructureX() { const { #x: x } = this; - return x; } diff --git a/test/language/expressions/class/elements/syntax/early-errors/grammar-private-field-on-object-destructuring.js b/test/language/expressions/class/elements/syntax/early-errors/grammar-private-field-on-object-destructuring.js index 797499c9f7..d83b0dedab 100644 --- a/test/language/expressions/class/elements/syntax/early-errors/grammar-private-field-on-object-destructuring.js +++ b/test/language/expressions/class/elements/syntax/early-errors/grammar-private-field-on-object-destructuring.js @@ -4,7 +4,7 @@ /*--- description: Acessing private field from object destructuring pattern is not a valid syntax (class expression) esid: prod-ClassElement -features: [class-fields-private, class] +features: [class-fields-private, destructuring-binding, class] flags: [generated] negative: phase: parse @@ -28,6 +28,5 @@ var C = class { destructureX() { const { #x: x } = this; - return x; } }; diff --git a/test/language/statements/class/elements/syntax/early-errors/grammar-private-field-on-object-destructuring.js b/test/language/statements/class/elements/syntax/early-errors/grammar-private-field-on-object-destructuring.js index 08a1478906..58326aec52 100644 --- a/test/language/statements/class/elements/syntax/early-errors/grammar-private-field-on-object-destructuring.js +++ b/test/language/statements/class/elements/syntax/early-errors/grammar-private-field-on-object-destructuring.js @@ -4,7 +4,7 @@ /*--- description: Acessing private field from object destructuring pattern is not a valid syntax (class declaration) esid: prod-ClassElement -features: [class-fields-private, class] +features: [class-fields-private, destructuring-binding, class] flags: [generated] negative: phase: parse @@ -28,6 +28,5 @@ class C { destructureX() { const { #x: x } = this; - return x; } }