Any workaround for bug 24118?

RazvanN razvan.nitu1305 at gmail.com
Wed Sep 6 10:57:24 UTC 2023


On Wednesday, 6 September 2023 at 07:54:41 UTC, Paolo Invernizzi 
wrote:
> On Tuesday, 5 September 2023 at 15:34:36 UTC, RazvanN wrote:
>> On Tuesday, 5 September 2023 at 13:19:15 UTC, Paolo Invernizzi 
>> wrote:
>>> Hi all,
>>>
>>> Actually we are unable to build any tools on Apple Silicon 
>>> due to issue 24118 [1]:
>>> Someone can suggest a workaround?
>>>
>>> We are not even sure about the root cause of it ...
>>>
>>> Thank you,
>>> Paolo
>>>
>>> [1] https://issues.dlang.org/show_bug.cgi?id=24118
>>
>> PR fixing the issue: https://github.com/dlang/dmd/pull/15578
>
> Thank you Razvan, I'll follow the progress of the PR

@Paolo: If you want to compile your code before my PR gets in, 
putting the ctfe code in a function will get rid of the ice:

```d
import std.algorithm : map;
import std.range : zip;
import std.typecons : tuple;

void mock()
{
     zip([1,2,3], ["a", "b", "c"])
             .map!( i => tuple("", i[1]) )
             .map!( a => a[0] ? a[0] : " " ~ a[1] )
             ;

}

void foo()
{
     if( __ctfe )
     {
         mock();
     }
}
```


More information about the Digitalmars-d mailing list