Skip to content

Commit ac92aab

Browse files
author
whitequark
committedAug 28, 2015
Fix default argument fiasco.
1 parent 6b8ef8c commit ac92aab

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed
 

Diff for: ‎artiq/compiler/embedding.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ def quote(self, value):
105105
if typ in self.type_map:
106106
instance_type, constructor_type = self.type_map[typ]
107107
else:
108-
instance_type = types.TInstance("{}.{}".format(typ.__module__, typ.__qualname__))
108+
instance_type = types.TInstance("{}.{}".format(typ.__module__, typ.__qualname__),
109+
OrderedDict())
109110
instance_type.attributes['__objectid__'] = builtins.TInt(types.TValue(32))
110111

111112
constructor_type = types.TConstructor(instance_type)

Diff for: ‎artiq/compiler/types.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,8 @@ class TInstance(TMono):
359359
was created
360360
"""
361361

362-
def __init__(self, name, attributes=OrderedDict()):
362+
def __init__(self, name, attributes):
363+
assert isinstance(attributes, OrderedDict)
363364
super().__init__(name)
364365
self.attributes = attributes
365366

0 commit comments

Comments
 (0)
Please sign in to comment.