mirror of https://github.com/tc39/test262.git
lint: disallow duplicate values in "features" tag (#3010)
This commit is contained in:
parent
64a8968246
commit
6c9d2222fb
|
@ -29,3 +29,6 @@ class CheckFeatures(Check):
|
|||
for feature in features:
|
||||
if feature not in self.valid_features:
|
||||
return 'Unrecognized feature: "%s"' % feature
|
||||
|
||||
if len(set(features)) != len(features):
|
||||
return 'The `features` tag may not include duplicate entries'
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
FEATURES
|
||||
^ expected errors | v input
|
||||
// Copyright (C) 2021 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
esid: sec-assignment-operators-static-semantics-early-errors
|
||||
description: Duplicated values in "features" frontmatter
|
||||
features: [object-spread, async-functions, object-spread]
|
||||
---*/
|
||||
|
||||
async function f({ ...a }) {}
|
Loading…
Reference in New Issue