1. scope
  2. hob

Commits

Jan Borsodi  committed e94738a

Only assign attribute in owner if the attribute field is set, this allows for symbols that uses callbacks.

  • Participants
  • Parent commits d755a41
  • Branches fixes

Comments (0)

Files changed (1)

File hob/parser.py

View file
             sym.resolved = item
             if not isinstance(item, sym.kind):
                 raise TypeError("Expected type %s for symbol %s" % (sym.kind.__name__, ".".join(current.path() + [sym.name])))
-            setattr(sym.owner, sym.attribute, item)
+            if sym.attribute != None:
+                setattr(sym.owner, sym.attribute, item)
             if sym.callback:
                 sym.callback(sym, item)
         self._symbols = []