Sign in
webkit
/
WebKit
/
8811b522c4d9fd9fbebc2e2caf8f1ebff78163f9
/
.
/
JSTests
/
es6
/
object_literal_extensions_computed_accessors.js
blob: db68e2b7fbf62ca59766e315e69838c45afc9ea0 [
file
] [
log
] [
blame
]
function
test
()
{
var
x
=
'y'
,
valueSet
,
obj
=
{
get
[
x
]
()
{
return
1
},
set
[
x
]
(
value
)
{
valueSet
=
value
}
};
obj
.
y
=
'foo'
;
return
obj
.
y
===
1
&&
valueSet
===
'foo'
;
}
if
(!
test
())
throw
new
Error
(
"Test failed"
);