Jelajahi Sumber

still replace `this` inside TFunction

Simon Krajewski 1 tahun lalu
induk
melakukan
28fdaa49ee
1 mengubah file dengan 7 tambahan dan 1 penghapusan
  1. 7 1
      src/coro/coroFromTexpr.ml

+ 7 - 1
src/coro/coroFromTexpr.ml

@@ -262,7 +262,13 @@ let expr_to_coro ctx (vresult,verror) cb_root e =
 			terminate cb (NextTry(cb_try,catches,cb_next)) e.etype e.epos;
 			cb_next,e_no_value
 		| TFunction tf ->
-			cb,e
+			let rec f e = match e.eexpr with
+				| TConst TThis ->
+					replace_this e
+				| _ ->
+					Type.map_expr f e
+			in
+			cb,f e
 	and ordered_loop cb el =
 		let close = start_ordered_value_list () in
 		let rec aux' cb acc el = match el with