else:
if "interface" in return_type:
interface_type = self.symtab.find(return_type["interface"]);
- if self.field in interface_type.data_members:
- # Return the type of the field
- return interface_type.data_members[self.field].type
+ if interface_type != None:
+ if self.field in interface_type.data_members:
+ # Return the type of the field
+ return interface_type.data_members[self.field].type
self.error("Invalid object field: " +
"Type '%s' does not have data member %s" % \
(return_type, self.field))