Skip to content

Commit 33a1d81

Browse files
m-schmidtxavierleroy
authored andcommitted
bug 39368, add clarification
1 parent 920033a commit 33a1d81

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cparser/Elab.ml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1540,12 +1540,14 @@ module I = struct
15401540
find (f_i :: before) after
15411541
in find [] flds
15421542
| TUnion(id, _), Init_union(id', fld, i) ->
1543+
(* matches in the most recently activated field, propagating current initializer *)
15431544
if fld.fld_name = name then
15441545
OK(Zunion(z, id, fld), i)
15451546
else if fld.fld_anonymous && has_member env name fld.fld_typ then
15461547
let zi = (Zunion(z, id, fld), i) in
15471548
member env zi name
15481549
else begin
1550+
(* matches in another field, creation of new default initializer *)
15491551
let rec find = function
15501552
| [] -> NotFound
15511553
| fld1 :: rem ->

0 commit comments

Comments
 (0)