mirror of https://github.com/tc39/test262.git
Remove `let` keyword and use `using` declaration (#4403)
This commit is contained in:
parent
74788df072
commit
6d5e6c229e
|
@ -7,20 +7,20 @@ includes: [compareArray.js]
|
||||||
features: [explicit-resource-management]
|
features: [explicit-resource-management]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
// Use using with null --------------
|
// Use using with null does not throw --------------
|
||||||
let withNullvalues = [];
|
let withNullvalues = [];
|
||||||
|
|
||||||
(function TestUsingWithNull() {
|
(function TestUsingWithNull() {
|
||||||
let using = null;
|
using x = null;
|
||||||
withNullvalues.push(42);
|
withNullvalues.push(42);
|
||||||
})();
|
})();
|
||||||
assert.compareArray(withNullvalues, [42]);
|
assert.compareArray(withNullvalues, [42]);
|
||||||
|
|
||||||
// Use using with undefined --------------
|
// Use using with undefined does not throw --------------
|
||||||
let withUndefinedvalues = [];
|
let withUndefinedvalues = [];
|
||||||
|
|
||||||
(function TestUsingWithUndefined() {
|
(function TestUsingWithUndefined() {
|
||||||
let using = undefined;
|
using x = undefined;
|
||||||
withUndefinedvalues.push(42);
|
withUndefinedvalues.push(42);
|
||||||
})();
|
})();
|
||||||
assert.compareArray(withUndefinedvalues, [42]);
|
assert.compareArray(withUndefinedvalues, [42]);
|
||||||
|
|
Loading…
Reference in New Issue