瀏覽代碼

Fix special _this variable in closures

Hugh Sanderson 13 年之前
父節點
當前提交
86d49c17a7
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      gencpp.ml

+ 1 - 1
gencpp.ml

@@ -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