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