소스 검색

Lua : fix situations where a generated value is itself an opassign

Justin Donaldson 10 년 전
부모
커밋
79bccba40e
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      genlua.ml

+ 6 - 0
genlua.ml

@@ -901,6 +901,12 @@ and gen_value ctx e =
 		)
 	in
 	match e.eexpr with
+	| TBinop (OpAssign, e1, e2) ->
+		spr ctx "(function() ";
+		gen_expr ctx e;
+		spr ctx " return ";
+		gen_value ctx e1;
+		spr ctx " end)()";
 	| TConst _
 	| TLocal _
 	| TArray _