diff --git a/artiq/compiler/embedding.py b/artiq/compiler/embedding.py index 1476dce4a..0b903dbe0 100644 --- a/artiq/compiler/embedding.py +++ b/artiq/compiler/embedding.py @@ -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) diff --git a/artiq/compiler/types.py b/artiq/compiler/types.py index 32501d961..73d53db52 100644 --- a/artiq/compiler/types.py +++ b/artiq/compiler/types.py @@ -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