why mixin template can not inclulde statement;

learnfirst1 learnfirst1 at gmail.com
Fri Aug 10 13:01:21 UTC 2018


On Friday, 10 August 2018 at 12:38:55 UTC, learnfirst1 wrote:
> mixin template test(A...){


mixin template test(A...){
         __gshared a = A;
}

extern(C) void main(){
         mixin test!123;
}

---------------

duplicate symbol __D4test4mainUZ8__mixin111__a_field_0i in:
     test.o
ld: 1 duplicate symbol for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to 
see invocation)
Error: linker exited with status 1


this really make no sense,  what is wrong with it?    (same code 
build with ldc2)


More information about the Digitalmars-d-learn mailing list