Bug 729256 - Make xpidl.py error out on multiple-method function interfaces. r=bsmedberg

This commit is contained in:
Nathan Froyd 2012-02-27 18:57:28 -05:00
Родитель 68ff68b9c7
Коммит 2fb087ff7a
1 изменённых файлов: 9 добавлений и 0 удалений

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

@ -531,6 +531,15 @@ class Interface(object):
break
self.doccomments = parent.getName(self.name, None).doccomments
if self.attributes.function:
has_method = False
for member in self.members:
if member.kind is 'method':
if has_method:
raise IDLError("interface '%s' has multiple methods, but marked 'function'" % self.name, self.location)
else:
has_method = True
parent.setName(self)
if self.base is not None:
realbase = parent.getName(self.base, self.location)