Closed Bug 1829025 Opened 3 years ago Closed 3 years ago

Add getter for union-type bindings for use with static exhaustive -Werror=switch checking

Categories

(Core :: DOM: Bindings (WebIDL), enhancement)

enhancement

Tracking

()

RESOLVED FIXED
114 Branch
Tracking Status
firefox114 --- fixed

People

(Reporter: jgilbert, Assigned: jgilbert)

Details

Attachments

(1 external file)

Not all modules in Gecko use -Werror=switch, but some (e.g. dom/canvas and dom/webgpu) do.

While the types passed to functions do change, causing compile errors, templates and auto can potentially cause us to miss cases when new union variants are added.

Also add a first use-case.

Assignee: nobody → jgilbert
Status: NEW → ASSIGNED
Pushed by jgilbert@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f5c90a7bff3b Add dom::FooOrBar::GetType() for bindings. r=peterv
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 114 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: