mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 521898, part 2: Rename StructField .type to .typespec to avoid unintended "shadowing". r=bent
This commit is contained in:
parent
0006967bc9
commit
1104ee58c2
@ -33,7 +33,7 @@ class Visitor:
|
||||
f.accept(self)
|
||||
|
||||
def visitStructField(self, field):
|
||||
field.type.accept(self)
|
||||
field.typespec.accept(self)
|
||||
|
||||
def visitUnionDecl(self, union):
|
||||
for t in union.components:
|
||||
@ -256,7 +256,7 @@ class Protocol(NamespacedNode):
|
||||
class StructField(Node):
|
||||
def __init__(self, loc, type, name):
|
||||
Node.__init__(self, loc)
|
||||
self.type = type
|
||||
self.typespec = type
|
||||
self.name = name
|
||||
|
||||
class StructDecl(NamespacedNode):
|
||||
|
@ -704,15 +704,15 @@ class GatherDecls(TcheckVisitor):
|
||||
self.symtab.enterScope(sd)
|
||||
|
||||
for f in sd.fields:
|
||||
ftypedecl = self.symtab.lookup(str(f.type))
|
||||
ftypedecl = self.symtab.lookup(str(f.typespec))
|
||||
if ftypedecl is None:
|
||||
self.error(f.loc, "field `%s' of struct `%s' has unknown type `%s'",
|
||||
f.name, sd.name, str(f.type))
|
||||
f.name, sd.name, str(f.typespec))
|
||||
continue
|
||||
|
||||
f.decl = self.declare(
|
||||
loc=f.loc,
|
||||
type=self._canonicalType(ftypedecl.type, f.type),
|
||||
type=self._canonicalType(ftypedecl.type, f.typespec),
|
||||
shortname=f.name,
|
||||
fullname=None)
|
||||
stype.fields.append(f.decl.type)
|
||||
|
Loading…
Reference in New Issue
Block a user