Sign in
webkit
/
WebKit
/
000a985cc582d9d77ca643860a7536440fb731b1
/
.
/
JSTests
/
es6
/
super_method_calls_use_correct_this_binding.js
blob: a0924bd7be4c6c7499f522c11806e4b808c2c5d7 [
file
] [
log
] [
blame
]
function
test
()
{
class
B
{
qux
(
a
)
{
return
this
.
foo
+
a
;
}
}
class
C extends B
{
qux
(
a
)
{
return
super
.
qux
(
"bar"
+
a
);
}
}
var
obj
=
new
C
();
obj
.
foo
=
"foo"
;
return
obj
.
qux
(
"baz"
)
===
"foobarbaz"
;
}
if
(!
test
())
throw
new
Error
(
"Test failed"
);