I kind of suspect this might be a bug, as per this evidence:
this seems ok
iex(2)> struct!(XX, field: 1)
%XX{field: 1}
iex(3)> %XX{field: 1}
%XX{field: 1}
this seems wrong
iex(4)> struct!(YY, field: 1)
%XX{field: 1}
iex(5)> %YY{field: 1}
%YY{field: 1}
Does anyone have an explanation for this, or is this a bug?
If %Mod{} is supposed to be the same as calling Mod.__struct__() or struct!(Mod), then it is a bug.
Thanks


















