<p dir="ltr">On 5 Apr 2014 13:45, "Johannes Pfau" <<a href="mailto:nospam@example.com">nospam@example.com</a>> wrote:<br>
><br>
> Am Sat, 5 Apr 2014 07:37:00 +0100<br>
> schrieb Iain Buclaw <<a href="mailto:ibuclaw@gdcproject.org">ibuclaw@gdcproject.org</a>>:<br>
> ><br>
> > Reason for no inline is "mismatched arguments" - which means that the<br>
> > caller and callee disagree on the arguments to pass to the function.<br>
> > The fix is to make sure that caller and callee arguments match when<br>
> > generating the function on both sides. We could prevent this from<br>
> > recurring by putting in an assert in the codegen.<br>
><br>
> Root cause is that const(char)[] is a distinct type compared to char[]<br>
> so I think we need to make const(char)[] a variant of char[].<br>
><br>
> We could use build_variant_type_copy and then modify the copy<br>
> to use the correct basetype. Here's a proof of concept, could you finish<br>
> this Iain?<br>
><br>
> (We should probably check all types which have a 'next' type if a<br>
> similar change makes sense for these)<br>
></p>
<p dir="ltr">I've had another thought for a while now that involves not constifying 'in' parameters, but at the same time not loosing its guarantee.<br>
</p>