Kaynağa Gözat

temp core compiler fix for optional structure field error

Simon Krajewski 11 yıl önce
ebeveyn
işleme
01cd80395d
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  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 [];
 						if not (link (ref None) a f2.cf_type) then error [];
 						a1.a_fields <- PMap.add n f2 a1.a_fields
 						a1.a_fields <- PMap.add n f2 a1.a_fields
 					| Const when Meta.has Meta.Optional f2.cf_meta ->
 					| 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];
 						error [has_no_field a n];
 			) a2.a_fields;
 			) a2.a_fields;