CTFE Status 2

Stefan Koch via Digitalmars-d digitalmars-d at puremagic.com
Sun May 21 07:49:32 PDT 2017


On Tuesday, 16 May 2017 at 13:44:27 UTC, Stefan Koch wrote:
> On Thursday, 16 February 2017 at 21:05:51 UTC, Stefan Koch 
> wrote:
>> [ ... ]
>
> So ...
> I just encountered more ABI issues; related to slices which are 
> part of structures.
> struct R
> {
>   uint[] s1;
>   uint[] s2;
> }
>
> like this.
>
> R returnSlices(int[] s1, int[] s2)
> {
>     return R(s1[], s2[]);
> }
> static assert(returnSlices([1,2,3], [4,5,6,7]) == 
> R([1,2,3][4.5.6.7])); // works
>
>
> R returnSlicedSlices(int[] s1, int[] s2)
> {
>     return R(s1[], s2[1 .. $-1]);
> }
> static assert(returnSlicedSlices([1,2,3], [4,5,6,7]) == 
> R([1,2,3],[5,6])); // fails
> // returns R([1,2,3],null); at the moment
>
> The reason ABI issues.
> Where exactly ? No Idea.

Huh apparently I fixed this issue.
But I cannot rememberer when or how I did it.
This test will now magically work.
This concerns me.


More information about the Digitalmars-d mailing list