Skip to content

Commit

Permalink
Fix default argument fiasco.
Browse files Browse the repository at this point in the history
  • Loading branch information
whitequark committed Aug 28, 2015
1 parent 6b8ef8c commit ac92aab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion artiq/compiler/embedding.py
Expand Up @@ -105,7 +105,8 @@ def quote(self, value):
if typ in self.type_map:
instance_type, constructor_type = self.type_map[typ]
else:
instance_type = types.TInstance("{}.{}".format(typ.__module__, typ.__qualname__))
instance_type = types.TInstance("{}.{}".format(typ.__module__, typ.__qualname__),
OrderedDict())
instance_type.attributes['__objectid__'] = builtins.TInt(types.TValue(32))

constructor_type = types.TConstructor(instance_type)
Expand Down
3 changes: 2 additions & 1 deletion artiq/compiler/types.py
Expand Up @@ -359,7 +359,8 @@ class TInstance(TMono):
was created
"""

def __init__(self, name, attributes=OrderedDict()):
def __init__(self, name, attributes):
assert isinstance(attributes, OrderedDict)
super().__init__(name)
self.attributes = attributes

Expand Down

0 comments on commit ac92aab

Please sign in to comment.