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:
Anvas 2014-03-22 00:25:40 -04:00
Родитель 2cb93a4388
Коммит 40e7bcc3c6
1 изменённых файлов: 9 добавлений и 1 удалений

Просмотреть файл

@ -260,7 +260,15 @@ class IDLScope(IDLObject):
isinstance(newObject, IDLExternalInterface) and \
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