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