blob: 97ecebd34704d0a00efb3b34198fe81e2f9f5dfa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
template: default
desc: No property access occurs for an "empty" object binding pattern
info: |
Runtime Semantics: BindingInitialization
ObjectBindingPattern : { }
1. Return NormalCompletion(empty).
---*/
//- setup
var accessCount = 0;
var obj = Object.defineProperty({}, 'attr', {
get: function() {
accessCount += 1;
}
});
//- elems
{}
//- vals
obj
//- body
assert.sameValue(accessCount, 0);
|