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