浏览代码

[analyzer] do not remove abstract `this` in local DCE

Simon Krajewski 9 年之前
父节点
当前提交
e071b68ab8
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      analyzer.ml

+ 1 - 1
analyzer.ml

@@ -2457,7 +2457,7 @@ module LocalDce = struct
 			Meta.has Meta.Used v.v_meta
 		in
 		let keep v =
-			is_used v || (not (Meta.has Meta.CompilerGenerated v.v_meta) && not ctx.config.local_dce) || is_ref_type v.v_type || v.v_capture
+			is_used v || (not (Meta.has Meta.CompilerGenerated v.v_meta) && not ctx.config.local_dce) || is_ref_type v.v_type || v.v_capture || Meta.has Meta.This v.v_meta
 		in
 		let rec use v =
 			if not (is_used v) then begin