# HG changeset patch # User Mike Pavone # Date 1342264769 25200 # Node ID f57b2f4048d0d2403974f916df966c304d2afb2a # Parent a6addd8c6bd4129060852182de0e1998647ed014 Fix funcall.populateSymbols to use the fixed up name when doing the initial symbol.find. This ensures the parent tree is properly produced diff -r a6addd8c6bd4 -r f57b2f4048d0 compiler.js --- a/compiler.js Sat Jul 14 04:18:46 2012 -0700 +++ b/compiler.js Sat Jul 14 04:19:29 2012 -0700 @@ -306,6 +306,8 @@ } } this.symbols = symbols; + var name = this.name[this.name.length-1] == ':' ? this.name.substr(0, this.name.length-1) : this.name; + symbols.find(name) for (var i in this.args) { this.args[i].populateSymbols(symbols); } @@ -344,6 +346,7 @@ }; assignment.prototype.populateSymbols = function(symbols) { + debugprint('//assignment', this.symbol.name, 'populateSymbols'); var existing = symbols.find(this.symbol.name); if (!existing) { symbols.defineVar(this.symbol.name, this.expression); @@ -353,6 +356,7 @@ this.symbols = symbols; }; assignment.prototype.populateSymbolsObject = function(symbols) { + debugprint('//messagedef', this.symbol.name, 'populateSymbols'); if (this.expression instanceof lambda || (this.expression instanceof funcall & this.expression.name == 'foreign:')) { symbols.defineMsg(this.symbol.name, this.expression); } else {