CTFE in imported static initializers
    Stefan Koch 
    uplink.coder at googlemail.com
       
    Tue May 14 09:30:56 UTC 2019
    
    
  
On Tuesday, 14 May 2019 at 08:26:41 UTC, Steven Schveighoffer 
wrote:
> On 5/13/19 9:39 PM, Steven Schveighoffer wrote:
>
>> Does anyone have a good answer for why this should happen, or 
>> should I file a bug?
>
>
> It's been mentioned to me that type inference is used here. 
> However, one could argue that the CTFE doesn't need to complete 
> in order to infer the type, the function is not a template or 
> auto function.
>
> In addition, if I change the declaration to:
>
> static string moddata = ...;
>
> It still takes 1 second to compile mod1.
>
> -Steve
try changing it to static immutable.
    
    
More information about the Digitalmars-d-learn
mailing list