Closed Bug 816846 Opened 12 years ago Closed 12 years ago

Error message when two attributes with the same name are defined in a WebIDL interface is ... obtuse

Categories

(Core :: DOM: Core & HTML, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla20

People

(Reporter: bzbarsky, Assigned: bzbarsky)

Details

Attachments

(1 file)

It goes something like this:

  File "/Users/bzbarsky/mozilla/debug/mozilla/dom/bindings/parser/WebIDL.py", line 299, in resolve
    scope.ensureUnique(self, object)
  File "/Users/bzbarsky/mozilla/debug/mozilla/dom/bindings/parser/WebIDL.py", line 217, in ensureUnique
    object)
  File "/Users/bzbarsky/mozilla/debug/mozilla/dom/bindings/parser/WebIDL.py", line 477, in resolveIdentifierConflict
    originalObject, newObject)
TypeError: resolveIdentifierConflict() takes exactly 5 arguments (4 given)

whereas it would be better if it produced something like:

WebIDL.WebIDLError: error: Multiple unresolvable definitions of identifier 'documentElement' in scope 'Interface 'Document'
        '<unresolved scope>::ElementOrNull' attribute '::Document::documentElement' at Document.webidl line 46:11
  readonly attribute Element? documentElement;
           ^
        'Long' attribute '<unresolved scope>::documentElement' at Document.webidl line 47:11
  readonly attribute long documentElement;
           ^
Comment on attachment 686932 [details] [diff] [review]
Correctly call up to our superclass to resolve an identifier conflict.

Review of attachment 686932 [details] [diff] [review]:
-----------------------------------------------------------------

Nice catch.
Attachment #686932 - Flags: review?(khuey) → review+
dzbarsky caught the problem, fwiw.
https://hg.mozilla.org/integration/mozilla-inbound/rev/e539177376ea
Flags: in-testsuite?
Whiteboard: [need review]
Target Milestone: --- → mozilla20
https://hg.mozilla.org/mozilla-central/rev/e539177376ea
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: