зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1795102, part 3 - Check that size_is parameter input-ness matches. r=nika
If I remembered anything from my logic programming days, I could come up a smarter sounding word for this than "input-ness". Differential Revision: https://phabricator.services.mozilla.com/D159318
This commit is contained in:
Родитель
27bac104c6
Коммит
5b6d7aabe4
|
@ -1342,6 +1342,14 @@ class Method(object):
|
|||
)
|
||||
if p.size_is:
|
||||
size_param = self.namemap.get(p.size_is, p.location)
|
||||
if (
|
||||
p.paramtype.count("in") == 1
|
||||
and size_param.paramtype.count("in") == 0
|
||||
):
|
||||
raise IDLError(
|
||||
"size_is parameter of an input must also be an input",
|
||||
p.location,
|
||||
)
|
||||
if getBuiltinOrNativeTypeName(size_param.realtype) != "unsigned long":
|
||||
raise IDLError(
|
||||
"size_is parameter must have type 'unsigned long'",
|
||||
|
|
Загрузка…
Ссылка в новой задаче