Request for Comment assert(__ctfe)
Walter Bright
newshound2 at digitalmars.com
Tue Apr 7 21:02:29 UTC 2020
On 4/7/2020 12:33 AM, Stefan Koch wrote:
> On Tuesday, 7 April 2020 at 06:55:59 UTC, Walter Bright wrote:
>> Sounds ok to me, as long as the assert(__ctfe) is the first statement in the
>> function body.
>>
>> Though I would check the linker map file to see if the linker didn't already
>> omit functions that were never called.
>
> In order to support contracts we need to go through all the statements in the
> merged contract .... but I can split that out.
You could move it up earlier in the semantic analysis. When semantic analysis
starts, simply check the first statement, and set a flag "no code gen" in the
FuncDeclaration.
More information about the Digitalmars-d
mailing list