Sign in
webkit
/
WebKit
/
6fd57f0545e2ab789319dc828ca2e5959d39c256
/
.
/
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"
);