2015-03-30 18:48:02 +02:00
|
|
|
// Copyright (C) 2014 the V8 project authors. All rights reserved.
|
2015-03-02 20:10:32 +01:00
|
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
/*---
|
|
|
|
es6id: 12.2.5
|
|
|
|
description: >
|
|
|
|
In an object, duplicate computed property getter names produce only a single property of
|
|
|
|
that name, whose value is the value of the last property of that name.
|
|
|
|
---*/
|
|
|
|
var calls = 0;
|
2015-03-05 19:39:30 +01:00
|
|
|
var A = {
|
2015-03-02 20:10:32 +01:00
|
|
|
set ['a'](_) {
|
|
|
|
calls++;
|
|
|
|
}
|
|
|
|
};
|
2015-03-05 19:39:30 +01:00
|
|
|
A.a = 'A';
|
|
|
|
assert.sameValue(calls, 1, "The value of `calls` is `1`, after executing `A.a = 'A';`");
|