浏览代码

[lua] add bitop feature when using bit negation

Justin Donaldson 9 年之前
父节点
当前提交
da39fa597c
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      src/generators/genlua.ml

+ 1 - 0
src/generators/genlua.ml

@@ -753,6 +753,7 @@ and gen_expr ?(local=true) ctx e = begin
 		spr ctx "not ";
 		spr ctx "not ";
 		gen_value ctx e;
 		gen_value ctx e;
 	| TUnop (NegBits,unop_flag,e) ->
 	| TUnop (NegBits,unop_flag,e) ->
+		add_feature ctx "use._bitop";
 		spr ctx "_hx_bit.bnot(";
 		spr ctx "_hx_bit.bnot(";
 		gen_value ctx e;
 		gen_value ctx e;
 		spr ctx ")";
 		spr ctx ")";