# HG changeset patch # User Paul Boddie # Date 1716652525 -7200 # Node ID 8a3f4c0ade8bf888cf8ba301c179b267d4edf8ca # Parent 9da80803c49accec315b7801f4e98a4650f28c06 Set a suitable object as the reference for instantiation results. diff -r 9da80803c49a -r 8a3f4c0ade8b translator.py --- a/translator.py Fri May 24 00:11:20 2024 +0200 +++ b/translator.py Sat May 25 17:55:25 2024 +0200 @@ -1118,7 +1118,7 @@ # Literals may be instantiated specially. if expr.is_name() and expr.name.startswith("$L") and objpath: - instantiation = literal_instantiation = objpath + instantiation = literal_instantiation = expr target = encode_literal_instantiator(objpath) context_required = False @@ -1133,7 +1133,7 @@ # Class invocation involves instantiators. if expr.has_kind(""): - instantiation = objpath + instantiation = expr target = encode_instantiator_pointer(objpath) init_ref = self.importer.all_class_attrs[objpath]["__init__"] target_structure = "&%s" % encode_path(init_ref)