Permalink
Browse files

Fix special _this variable in closures

git-svn-id: http://haxe.googlecode.com/svn/trunk@5411 f16182fa-f095-11de-8f43-4547254af6c6
  • Loading branch information...
1 parent d4ec1df commit 2b189b465fb070ab3020907eeb3794f55b4bc9a5 gamehaxe@gmail.com committed Oct 7, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 gencpp.ml
View
@@ -1155,7 +1155,7 @@ and define_local_return_block_ctx ctx expression name =
let output_i = writer#write_i in
let output = ctx.ctx_output in
let check_this = function | "this" when not ctx.ctx_real_this_ptr -> "__this" | x -> x in
- let reference = function | "this" -> " *__this" | name -> " &" ^name in
+ let reference = function | "this" -> " *__this" | "_this" -> " _this" | name -> " &" ^name in
let rec define_local_return_block expression =
let declarations = Hashtbl.create 0 in
let undeclared = Hashtbl.create 0 in

0 comments on commit 2b189b4

Please sign in to comment.