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

RESOLVED FIXED in mozilla20

Status

()

RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: bzbarsky, Assigned: bzbarsky)

Tracking

unspecified
mozilla20
x86
Mac OS X
Points:
---
Bug Flags:
in-testsuite ?

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

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;
           ^
(Assignee)

Comment 1

6 years ago
Created attachment 686932 [details] [diff] [review]
Correctly call up to our superclass to resolve an identifier conflict.
Attachment #686932 - Flags: review?(khuey)
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+
(Assignee)

Comment 3

6 years ago
dzbarsky caught the problem, fwiw.
(Assignee)

Comment 4

6 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/e539177376ea
Flags: in-testsuite?
Whiteboard: [need review]
Target Milestone: --- → mozilla20

Comment 5

6 years ago
https://hg.mozilla.org/mozilla-central/rev/e539177376ea
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.