Error: variable foo conflicts with struct foo

Stijn stijn.herreman at telenet.be
Thu Jan 4 17:45:35 UTC 2018


Why is it not allowed for a variable name to match a type name? 
The following example fails with "Error: variable foo conflicts 
with struct foo"

     struct foo {}
     foo foo;


More information about the Digitalmars-d-learn mailing list