Bug 225453
Summary: | [JSC] Wrong names set for anonymous classes from static class fields in some cases | ||
---|---|---|---|
Product: | WebKit | Reporter: | Caio Lima <ticaiolima> |
Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | Safari Technology Preview | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Caio Lima
The following example is setting the wrong name for anonymous classes:
```
class C { static InnerClass = class { static f = this.name; } }
print(C.InnerClass.name); // prints “”, but should print “InnerClass”
```
The following example does it correctly:
```
class C { static InnerClass = class { static f; } }
print(C.InnerClass.name); // prints “InnerClass”
```
Both Firefox and Chrome are returning “InnerClass” for both examples. This example came up from a spec bug pointed out on https://github.com/tc39/ecma262/pull/1668#issuecomment-608189621.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/77963278>