Browse Source

[tre] fix tre-compatibility detection for static vars

Aleksandr Kuzmenko 5 years ago
parent
commit
dba77893cd
1 changed files with 3 additions and 2 deletions
  1. 3 2
      src/filters/tre.ml

+ 3 - 2
src/filters/tre.ml

@@ -209,9 +209,10 @@ let run ctx =
 					match ctx.curfield.cf_kind with
 					match ctx.curfield.cf_kind with
 					| Method MethDynamic -> false
 					| Method MethDynamic -> false
 					| Method MethInline -> true
 					| Method MethInline -> true
-					| _ ->
+					| Method MethNormal ->
 						PMap.mem ctx.curfield.cf_name ctx.curclass.cl_statics
 						PMap.mem ctx.curfield.cf_name ctx.curclass.cl_statics
-						|| has_class_field_flag ctx.curfield CfFinal
+					| _ ->
+						has_class_field_flag ctx.curfield CfFinal
 					in
 					in
 				let is_recursive_call callee args =
 				let is_recursive_call callee args =
 					is_tre_eligible && is_recursive_method_call ctx.curclass ctx.curfield callee args
 					is_tre_eligible && is_recursive_method_call ctx.curclass ctx.curfield callee args