2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-21 01:16:28 +08:00

compiler.embedding: use qualified name when embedding methods.

This commit is contained in:
whitequark 2015-08-28 01:14:19 -05:00
parent 13e612c11b
commit 6b55e3bd80

View File

@ -101,7 +101,7 @@ 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.__name__)) instance_type = types.TInstance("{}.{}".format(typ.__module__, typ.__qualname__))
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)