https://issues.dlang.org/show_bug.cgi?id=23152
RazvanN <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #1 from RazvanN <[email protected]> --- I, personally, find that the "is used as a type error" is actually misleading in this context. S1 is a type, the problem is that the variable should have a different name. The "circular reference to variable S1" is also annoying, but I think it's closer to the truth since you are actually creating a circular reference. Ideally, the error message should be: "variable name S1 conflicts with struct declaration S1". Also, it seems that: void fun() { S1 S1; } compiles just fine. Which should not. --
