mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-19 00:16:29 +08:00
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:
|
||||
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)
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user