is this a bug ? mixin template static function missing!

learnfirst1 learnfirst1 at gmail.com
Fri Aug 10 11:17:10 UTC 2018


On Friday, 10 August 2018 at 10:24:55 UTC, Simen Kjærås wrote:
> On Friday, 10 August 2018 at 08:31:21 UTC, learnfirst1 wrote:
> The correct behavior would be for the compiler to show the 
> latter error message for a mixin'd function as well.
>
> Filed a bug:
> https://issues.dlang.org/show_bug.cgi?id=19153
>
> --
>   Simen
>

I think the static extern(C)  nested function should just work 
like global extern(C) function.   DMD still report missing 
symbols.   Or I am wrong about this ?

template G(){
     static extern(C) pragma(crt_constructor) void init(){}
}
void main(){
     mixin G!(); // Line 5
     init();
}


More information about the Digitalmars-d-learn mailing list