# HG changeset patch # User Paul Boddie # Date 1489527674 -3600 # Node ID 5dee09a0c824531f6e12543834f67dd5004741a7 # Parent fcdcc00b3f669cc05f1c542129ca0ef3eeb77219 Handle temporary name output generation as a special case. diff -r fcdcc00b3f66 -r 5dee09a0c824 translator.py --- a/translator.py Tue Mar 14 18:17:26 2017 +0100 +++ b/translator.py Tue Mar 14 22:41:14 2017 +0100 @@ -1384,11 +1384,6 @@ ref, paths = self.importer.get_module(self.name).special[n.name] return TrResolvedNameRef(n.name, ref) - # Temporary names are output program locals. - - elif n.name.startswith("$t"): - return TrResolvedNameRef(n.name, Reference(""), expr=expr) - # Get the appropriate name for the name reference, using the same method # as in the inspector. diff -r fcdcc00b3f66 -r 5dee09a0c824 transresults.py --- a/transresults.py Tue Mar 14 18:17:26 2017 +0100 +++ b/transresults.py Tue Mar 14 22:41:14 2017 +0100 @@ -78,6 +78,14 @@ "Return an output representation of the referenced name." + # Temporary names are output program locals. + + if self.name.startswith("$t"): + if self.expr: + return "%s = %s" % (encode_path(self.name), self.expr) + else: + return encode_path(self.name) + # For sources, any identified static origin will be constant and thus # usable directly. For targets, no constant should be assigned and thus # the alias (or any plain name) will be used.