<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Second call to super() should fail"
href="https://bugs.webkit.org/show_bug.cgi?id=155060#c1">Comment # 1</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Second call to super() should fail"
href="https://bugs.webkit.org/show_bug.cgi?id=155060">bug 155060</a>
from <span class="vcard"><a class="email" href="mailto:gskachkov@gmail.com" title="GSkachkov <gskachkov@gmail.com>"> <span class="fn">GSkachkov</span></a>
</span></b>
<pre>We have very close issue to this <a class="bz_bug_link
bz_status_NEW "
title="NEW - calling super() a second time in a constructor should throw"
href="show_bug.cgi?id=151113">https://bugs.webkit.org/show_bug.cgi?id=151113</a> that rely on discussion <a href="https://esdiscuss.org/topic/duplicate-super-call-behaviour">https://esdiscuss.org/topic/duplicate-super-call-behaviour</a>
test example:
class Foo {
constructor() {
console.log("foo");
}
}
class Bar extends Foo {
constructor() {
super();
console.log("bar");
super();
}
}
new Bar;
If we will strictly follow specs we will have:
foo
bar
foo
ReferenceError: This can not be initialized twice.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>