瀏覽代碼

correctly set function type for member var fields

Simon Krajewski 12 年之前
父節點
當前提交
65e1038e2e
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      typeload.ml

+ 1 - 1
typeload.ml

@@ -214,7 +214,7 @@ let type_function_param ctx t e opt p =
 		t, e
 
 let type_var_field ctx t e stat p =
-	if stat then ctx.curfun <- FunStatic;
+	if stat then ctx.curfun <- FunStatic else ctx.curfun <- FunMember;
 	let e = type_expr ctx e (WithType t) in
 	unify ctx e.etype t p;
 	match t with