Skip to content

Commit

Permalink
Fix default argument fiasco.
Browse files Browse the repository at this point in the history
whitequark committed Aug 28, 2015

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 6b8ef8c commit ac92aab
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion artiq/compiler/embedding.py
Original file line number Diff line number Diff line change
@@ -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)
3 changes: 2 additions & 1 deletion artiq/compiler/types.py
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit ac92aab

Please sign in to comment.