Sign in
webkit
/
WebKit
/
fff5469af9e21121a01bc52b64d66a2e93b51665
/
.
/
JSTests
/
es6
/
class_computed_accessor_properties.js
blob: 8e710474e924a836f922c6d7668fbf2f33b3cf55 [
file
] [
log
] [
blame
]
function
test
()
{
var
garply
=
"foo"
,
grault
=
"bar"
,
baz
=
false
;
class
C
{
get
[
garply
]()
{
return
"foo"
;
}
set
[
grault
](
x
)
{
baz
=
x
;
}
}
new
C
().
bar
=
true
;
return
new
C
().
foo
===
"foo"
&&
baz
;
}
if
(!
test
())
throw
new
Error
(
"Test failed"
);