瀏覽代碼

temp core compiler fix for optional structure field error

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

+ 1 - 1
type.ml

@@ -1085,7 +1085,7 @@ let rec unify a b =
 						if not (link (ref None) a f2.cf_type) then error [];
 						a1.a_fields <- PMap.add n f2 a1.a_fields
 					| Const when Meta.has Meta.Optional f2.cf_meta ->
-						()
+						a1.a_fields <- PMap.add f2.cf_name f2 a1.a_fields;
 					| _ ->
 						error [has_no_field a n];
 			) a2.a_fields;