From 84ca8163784834d0134f1019a64dfeb826a12f34 Mon Sep 17 00:00:00 2001 From: Leo Balter Date: Wed, 5 Sep 2018 16:56:58 -0400 Subject: [PATCH] Use heritage for cases checking early errors with super --- .../grammar-special-meth-contains-super-async-gen.case | 3 +++ .../grammar-special-meth-contains-super-async.case | 3 +++ .../grammar-special-meth-contains-super-gen.case | 3 +++ .../grammar-special-meth-contains-super-get.case | 3 +++ .../grammar-special-meth-contains-super-method.case | 3 +++ .../grammar-special-meth-contains-super-private-async-gen.case | 3 +++ .../grammar-special-meth-contains-super-private-async.case | 3 +++ .../grammar-special-meth-contains-super-private-gen.case | 3 +++ .../grammar-special-meth-contains-super-private-method.case | 3 +++ .../grammar-special-meth-contains-super-set.case | 3 +++ 10 files changed, 30 insertions(+) diff --git a/src/class-elements/grammar-special-meth-contains-super-async-gen.case b/src/class-elements/grammar-special-meth-contains-super-async-gen.case index f46bcd44cd..228ef63c51 100644 --- a/src/class-elements/grammar-special-meth-contains-super-async-gen.case +++ b/src/class-elements/grammar-special-meth-contains-super-async-gen.case @@ -12,6 +12,9 @@ template: syntax/invalid features: [async-iteration] ---*/ +// Uses a valid heritage to avoid false positives +//- heritage +extends Function //- elements async * method() { super(); diff --git a/src/class-elements/grammar-special-meth-contains-super-async.case b/src/class-elements/grammar-special-meth-contains-super-async.case index 0b0933323b..ce41e7f468 100644 --- a/src/class-elements/grammar-special-meth-contains-super-async.case +++ b/src/class-elements/grammar-special-meth-contains-super-async.case @@ -12,6 +12,9 @@ template: syntax/invalid features: [async-functions] ---*/ +// Uses a valid heritage to avoid false positives +//- heritage +extends Function //- elements async method() { super(); diff --git a/src/class-elements/grammar-special-meth-contains-super-gen.case b/src/class-elements/grammar-special-meth-contains-super-gen.case index 470164f5bb..a8bbf27806 100644 --- a/src/class-elements/grammar-special-meth-contains-super-gen.case +++ b/src/class-elements/grammar-special-meth-contains-super-gen.case @@ -12,6 +12,9 @@ template: syntax/invalid features: [generators] ---*/ +// Uses a valid heritage to avoid false positives +//- heritage +extends Function //- elements * method() { super(); diff --git a/src/class-elements/grammar-special-meth-contains-super-get.case b/src/class-elements/grammar-special-meth-contains-super-get.case index b570becd4d..dffae6d20d 100644 --- a/src/class-elements/grammar-special-meth-contains-super-get.case +++ b/src/class-elements/grammar-special-meth-contains-super-get.case @@ -11,6 +11,9 @@ info: | template: syntax/invalid ---*/ +// Uses a valid heritage to avoid false positives +//- heritage +extends Function //- elements get method() { super(); diff --git a/src/class-elements/grammar-special-meth-contains-super-method.case b/src/class-elements/grammar-special-meth-contains-super-method.case index c6a58a10d4..39e0e6f2a2 100644 --- a/src/class-elements/grammar-special-meth-contains-super-method.case +++ b/src/class-elements/grammar-special-meth-contains-super-method.case @@ -11,6 +11,9 @@ info: | template: syntax/invalid ---*/ +// Uses a valid heritage to avoid false positives +//- heritage +extends Function //- elements method() { super(); diff --git a/src/class-elements/grammar-special-meth-contains-super-private-async-gen.case b/src/class-elements/grammar-special-meth-contains-super-private-async-gen.case index 04efb2836e..a93d9021e9 100644 --- a/src/class-elements/grammar-special-meth-contains-super-private-async-gen.case +++ b/src/class-elements/grammar-special-meth-contains-super-private-async-gen.case @@ -12,6 +12,9 @@ template: syntax/invalid features: [async-iteration, class-methods-private] ---*/ +// Uses a valid heritage to avoid false positives +//- heritage +extends Function //- elements async * #method() { super(); diff --git a/src/class-elements/grammar-special-meth-contains-super-private-async.case b/src/class-elements/grammar-special-meth-contains-super-private-async.case index e3c58f0e86..24af70a073 100644 --- a/src/class-elements/grammar-special-meth-contains-super-private-async.case +++ b/src/class-elements/grammar-special-meth-contains-super-private-async.case @@ -12,6 +12,9 @@ template: syntax/invalid features: [async-functions, class-methods-private] ---*/ +// Uses a valid heritage to avoid false positives +//- heritage +extends Function //- elements async #method() { super(); diff --git a/src/class-elements/grammar-special-meth-contains-super-private-gen.case b/src/class-elements/grammar-special-meth-contains-super-private-gen.case index 9c5cf8559e..dc7a221970 100644 --- a/src/class-elements/grammar-special-meth-contains-super-private-gen.case +++ b/src/class-elements/grammar-special-meth-contains-super-private-gen.case @@ -12,6 +12,9 @@ template: syntax/invalid features: [generators, class-methods-private] ---*/ +// Uses a valid heritage to avoid false positives +//- heritage +extends Function //- elements * #method() { super(); diff --git a/src/class-elements/grammar-special-meth-contains-super-private-method.case b/src/class-elements/grammar-special-meth-contains-super-private-method.case index 98738c9cd3..7db48dc040 100644 --- a/src/class-elements/grammar-special-meth-contains-super-private-method.case +++ b/src/class-elements/grammar-special-meth-contains-super-private-method.case @@ -12,6 +12,9 @@ template: syntax/invalid features: [class-methods-private] ---*/ +// Uses a valid heritage to avoid false positives +//- heritage +extends Function //- elements #method() { super(); diff --git a/src/class-elements/grammar-special-meth-contains-super-set.case b/src/class-elements/grammar-special-meth-contains-super-set.case index 8944d221ab..e124335990 100644 --- a/src/class-elements/grammar-special-meth-contains-super-set.case +++ b/src/class-elements/grammar-special-meth-contains-super-set.case @@ -11,6 +11,9 @@ info: | template: syntax/invalid ---*/ +// Uses a valid heritage to avoid false positives +//- heritage +extends Function //- elements set method(_) { super();