瀏覽代碼

fixed type bug (fixed issue #1761)

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

+ 1 - 1
typer.ml

@@ -1180,7 +1180,7 @@ and type_field ctx e i p mode =
 				let f = PMap.find ("get_" ^ f.cf_name) c.cl_statics in
 				let f = PMap.find ("get_" ^ f.cf_name) c.cl_statics in
 				let t = field_type f in
 				let t = field_type f in
 				let r = match follow t with TFun(_,r) -> r | _ -> raise Not_found in
 				let r = match follow t with TFun(_,r) -> r | _ -> raise Not_found in
-				let ef = field_expr f r in
+				let ef = field_expr f t in
 				AKExpr(make_call ctx ef [e] r p)
 				AKExpr(make_call ctx ef [e] r p)
 			| MSet, Var {v_write = AccCall } ->
 			| MSet, Var {v_write = AccCall } ->
 				let f = PMap.find ("set_" ^ f.cf_name) c.cl_statics in
 				let f = PMap.find ("set_" ^ f.cf_name) c.cl_statics in