Browse Source

propagate enum fields if they are used only once

Simon Krajewski 10 years ago
parent
commit
eee5456d62
1 changed files with 2 additions and 0 deletions
  1. 2 0
      analyzer.ml

+ 2 - 0
analyzer.ml

@@ -1065,6 +1065,8 @@ module ConstPropagation = struct
 			end
 		| TEnumParameter _ when not (com.platform = Php) ->
 			Ssa.get_var_usage_count v0 <= 1
+		| TField(_,FEnum _) ->
+			Ssa.get_var_usage_count v0 <= 1
 		| _ ->
 			false