CTFE and return statement from delegate

Rajesh joseph.rajesh at gmail.com
Mon Jun 30 04:51:58 UTC 2025


On Sunday, 29 June 2025 at 21:56:19 UTC, 0xEAB wrote:
> On Sunday, 29 June 2025 at 13:06:38 UTC, Rajesh wrote:
>> Is there a restriction that I cannot call **return** from 
>> foreach (opApply delegate) if it is executed at compile time?
>
> To me this looks like a compiler bug where it runs into a wrong 
> assumption once it finds the return statement in the foreach 
> body and has to give up earlier.

Thanks for your reply. It looks like a bug to me as well, but I 
wanted to confirm with experts if it's a known issue or a 
limitation before I file a bug report.


More information about the Digitalmars-d-learn mailing list