WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
288418
Make NameScope a read-only class
https://bugs.webkit.org/show_bug.cgi?id=288418
Summary
Make NameScope a read-only class
Kiet Ho
Reported
2025-02-24 15:35:13 PST
NameScope is currently a struct, so it's easy to construct invalid NameScopes that breaks invariants. For example: None type with non-empty name vector, or Ident type with empty name vector. Therefore NameScope should be "hermantic" - once it's created, it's not possible to change it. The constructor should also be changed such that it's not possible to construct an invalid NameScope.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2025-02-24 15:35:27 PST
<
rdar://problem/145515115
>
Kiet Ho
Comment 2
2025-02-24 15:35:57 PST
Some comments about the purpose of the class would be nice to, since this is *very* different from ScopedName.
Radar WebKit Bug Importer
Comment 3
2025-02-24 15:36:06 PST
<
rdar://problem/145515199
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug