Bug 1319595, part 4 - Fix type checker handling of end points without qualifiers. r=billm

If qname has no quals, then fullname would be None, which breaks the
string concatenation in parentEndpointDecl and childEndpointDecl, even
if no endpoints are declared. This patch uses the short name if there
are no quals, while preserving the behavior that we want to pass None
into declare for fullname.

MozReview-Commit-ID: 9nuO8GWhBRH

--HG--
extra : rebase_source : df7e8b80d06b5cf1d4905624c0a3c4eac6703612
This commit is contained in:
Andrew McCreight 2016-11-22 13:55:59 -08:00
Родитель 025b63715a
Коммит 6d897bf5ca
1 изменённых файлов: 2 добавлений и 5 удалений

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

@ -709,16 +709,13 @@ class GatherDecls(TcheckVisitor):
# a type-neutral |using| that works for C++ and protocol
# types?
qname = p.qname()
if 0 == len(qname.quals):
fullname = None
else:
fullname = str(qname)
fullname = str(qname)
p.decl = self.declare(
loc=p.loc,
type=ProtocolType(qname, p.nestedRange, p.sendSemantics,
stateless=(0 == len(p.transitionStmts))),
shortname=p.name,
fullname=fullname)
fullname=None if 0 == len(qname.quals) else fullname)
p.parentEndpointDecl = self.declare(
loc=p.loc,