Bug 187957
| Summary: | Different output compared with other JS engines when function name is same to variable name | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | sunlili |
| Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | fpizlo, ysuzuki |
| Priority: | P2 | ||
| Version: | WebKit Local Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
sunlili
Hello,
Running following js code:
------------------------
function test() {
x = 4;
do {
var ss = 100;
function ss() {
print("in func");
}
x--;
ss = 101;
} while(x>0)
}
test();
print("BT_FLAG")
------------------------
Output of V8 and Firefoz:
SyntaxError: Identifier 'ss' has already been declared
However, output of jsc:
BT_FLAG
BT group
2018.7.24
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |