forked from M-Labs/artiq
Fix default argument fiasco.
This commit is contained in:
parent
6b8ef8c490
commit
ac92aabce1
|
@ -105,7 +105,8 @@ class ASTSynthesizer:
|
||||||
if typ in self.type_map:
|
if typ in self.type_map:
|
||||||
instance_type, constructor_type = self.type_map[typ]
|
instance_type, constructor_type = self.type_map[typ]
|
||||||
else:
|
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))
|
instance_type.attributes['__objectid__'] = builtins.TInt(types.TValue(32))
|
||||||
|
|
||||||
constructor_type = types.TConstructor(instance_type)
|
constructor_type = types.TConstructor(instance_type)
|
||||||
|
|
|
@ -359,7 +359,8 @@ class TInstance(TMono):
|
||||||
was created
|
was created
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, name, attributes=OrderedDict()):
|
def __init__(self, name, attributes):
|
||||||
|
assert isinstance(attributes, OrderedDict)
|
||||||
super().__init__(name)
|
super().__init__(name)
|
||||||
self.attributes = attributes
|
self.attributes = attributes
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue