зеркало из https://github.com/mozilla/gecko-dev.git
Bug 946897 - Report a more helpful error message when there is a name collision between an IDLExternalInterface and some other named IDL object. r=khuey
This commit is contained in:
Родитель
2cb93a4388
Коммит
40e7bcc3c6
|
@ -261,6 +261,14 @@ class IDLScope(IDLObject):
|
|||
originalObject.identifier.name == newObject.identifier.name:
|
||||
return originalObject
|
||||
|
||||
if (isinstance(originalObject, IDLExternalInterface) or
|
||||
isinstance(newObject, IDLExternalInterface)):
|
||||
raise WebIDLError(
|
||||
"Name collision between "
|
||||
"interface declarations for identifier '%s' at '%s' and '%s'"
|
||||
% (identifier.name,
|
||||
originalObject.location, newObject.location), [])
|
||||
|
||||
# We do the merging of overloads here as opposed to in IDLInterface
|
||||
# because we need to merge overloads of NamedConstructors and we need to
|
||||
# detect conflicts in those across interfaces. See also the comment in
|
||||
|
|
Загрузка…
Ссылка в новой задаче