Преглед изворни кода

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