Mangling externally imported names by using aliasing
This commit is contained in:
committed by
Richard van Velzen
parent
59e1601fb8
commit
86b5248837
@@ -1070,8 +1070,12 @@ function OutputStream(options) {
|
||||
});
|
||||
|
||||
DEFPRINT(AST_NameImport, function(self, output) {
|
||||
if (self.foreign_name) {
|
||||
self.foreign_name.print(output);
|
||||
var definition = self.name.definition();
|
||||
var names_are_different =
|
||||
(definition && definition.mangled_name || self.name.name) !==
|
||||
self.foreign_name.name;
|
||||
if (names_are_different) {
|
||||
output.print(self.foreign_name.name);
|
||||
output.space();
|
||||
output.print("as");
|
||||
output.space();
|
||||
|
||||
Reference in New Issue
Block a user