Bug 247437
Summary: | `toString` of a generator function is wrong | ||
---|---|---|---|
Product: | WebKit | Reporter: | Kanguk Lee <p51lee> |
Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | Normal | CC: | ashvayka, mark.lam, webkit-bug-importer, ysuzuki |
Priority: | P2 | Keywords: | InRadar |
Version: | WebKit Local Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Kanguk Lee
// input.js
print (
String(function * () {})
);
__________________________
Hello,
The space between `function` and `*` should be retained in the result of toString of the generator function, but JSC removes all the space between them.
Running the input.js with JSC prints:
---
$ jsc input.js
function* () {}
---
while other engines behave like:
---
# V8 (used console.log)
$ node input.js
function * () {}
# GraalJS
$ js input.js
function * () {}
---
WebKit version: 615.1.10
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/102065151>
Yusuke Suzuki
*** Bug 247438 has been marked as a duplicate of this bug. ***
Yusuke Suzuki
This is Function#toString thing feature, which is not implemented.
Alexey Shvayka
*** This bug has been marked as a duplicate of bug 190501 ***