Selaa lähdekoodia

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

Simon Krajewski 9 vuotta sitten
vanhempi
commit
e071b68ab8
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  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