Browse Source

add "me" to locals to allow typing (fixed issue #965)

Simon Krajewski 13 years ago
parent
commit
8fb85158de
1 changed files with 1 additions and 1 deletions
  1. 1 1
      typer.ml

+ 1 - 1
typer.ml

@@ -576,7 +576,7 @@ let get_this ctx p =
 		if ctx.untyped then display_error ctx "Cannot access this in 'untyped' mode : use either '__this__' or var 'me = this' (transitional)" p;
 		let v = (match ctx.vthis with
 			| None ->
-				let v = alloc_var "me" ctx.tthis in
+				let v = add_local ctx "me" ctx.tthis in
 				ctx.vthis <- Some v;
 				v
 			| Some v -> v