Sign in
webkit
/
WebKit
/
3a634092e3245645233a54f0f3632665b4137d5f
/
.
/
JSTests
/
es6
/
class_computed_prototype_methods.js
blob: f653145bdc8b14cb57c29cb68031ff27dc069a81 [
file
] [
log
] [
blame
]
function
test
()
{
var
foo
=
"method"
;
class
C
{
[
foo
]()
{
return
2
;
}
}
return
typeof
C
.
prototype
.
method
===
"function"
&&
new
C
().
method
()
===
2
;
}
if
(!
test
())
throw
new
Error
(
"Test failed"
);