Bug 1319595, part 3 - Allow including a type twice as long as it is from the same file both times. r=billm

This patch fixes multipleUsingCxxTypes.ipdl. This is a regression from
bug 918651.

MozReview-Commit-ID: 3ByBvp6FZUe

--HG--
extra : rebase_source : 8038d8662360a8f12e571716eb7c59d2b3754508
This commit is contained in:
Andrew McCreight 2016-11-22 14:25:04 -08:00
parent 175c88a5d3
commit 025b63715a

View File

@ -1391,8 +1391,10 @@ class _GenerateProtocolCode(ipdl.ast.Visitor):
typesToIncludes = {}
for using in tu.using:
typestr = str(using.type.spec)
assert typestr not in typesToIncludes
typesToIncludes[typestr] = using.header
if typestr not in typesToIncludes:
typesToIncludes[typestr] = using.header
else:
assert typesToIncludes[typestr] == using.header
aggregateTypeIncludes = set()
for su in tu.structsAndUnions: