[Webkit-unassigned] [Bug 143012] New: ES6: Classes: Early return in sub-class constructor results in returning undefined instead of instance
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Mar 24 12:53:52 PDT 2015
https://bugs.webkit.org/show_bug.cgi?id=143012
Bug ID: 143012
Summary: ES6: Classes: Early return in sub-class constructor
results in returning undefined instead of instance
Classification: Unclassified
Product: WebKit
Version: 528+ (Nightly build)
Hardware: All
OS: All
Status: NEW
Severity: Normal
Priority: P2
Component: JavaScriptCore
Assignee: webkit-unassigned at lists.webkit.org
Reporter: joepeck at webkit.org
CC: ggaren at apple.com, rniwa at webkit.org, timothy at apple.com
* SUMMARY
Early return in sub-class constructor results in returning undefined instead of instance
* TEST
<script>
class Base { constructor(){ return; } }
class Derived extends Base {
constructor()
{
super();
// This early return breaks things.
return;
}
}
var x = new Derived;
console.log(x); // undefined, should be new Derived.
</script>
* EXPECTED
Derived instance in `x`.
* ACTUAL
undefined in `x`.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150324/0ced04d0/attachment-0002.html>
More information about the webkit-unassigned
mailing list