Fix for EmptyCompiledName

This commit is contained in:
Nelson, Karl E
2019-06-23 14:55:35 -07:00
committed by Dave Halter
parent 265abe1d08
commit 344a03e6b2

View File

@@ -281,7 +281,11 @@ class CompiledName(AbstractNameDefinition):
@property
def api_type(self):
return next(iter(self.infer())).api_type
api = self.infer()
# If we can't find the type, assume it is an instance variable
if not api:
return "instance"
return next(iter(api)).api_type
@underscore_memoization
def infer(self):