changeset 77:8a9b96888b7d

Fix another symbol table/closure bug
author Mike Pavone <pavone@retrodev.com>
date Sun, 15 Jul 2012 13:13:06 -0700
parents c801dccdb4fb
children abc6f3d644a4
files compiler.js
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/compiler.js	Sun Jul 15 13:06:29 2012 -0700
+++ b/compiler.js	Sun Jul 15 13:13:06 2012 -0700
@@ -320,7 +320,10 @@
 	}
 	this.symbols = symbols;
 	var name = this.name[this.name.length-1] == ':' ? this.name.substr(0, this.name.length-1) : this.name;
-	symbols.find(name)
+	var funinfo = symbols.find(name);
+	if (funinfo && (funinfo.type == 'self' || funinfo.type == 'parent')) {
+		symbols.find('self');
+	}
 	for (var i in this.args) {
 		this.args[i].populateSymbols(symbols);
 	}