https://issues.dlang.org/show_bug.cgi?id=17626
David Baum <da...@weka.io> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Same name variable |Same name variable |assignment should be |assignment should raise a |prohibited |compile-time warning --- Comment #1 from David Baum <da...@weka.io> --- I would like to suggest having the following code raise a compile-time warning: ``` x = x; ``` Other than invoking the copy constructor, this is a no-op. I had the following piece of code, which for "some reason" didn't work: ``` struct FuncPtr{ void* ptr; this(void* ptr){ ptr = ptr; } ... } ``` Locating this wasn't immediate, and I don't see valid reasons for someone to purposely write such a code. I suggest at least raising a compile-time warning. Much easier than to hunt for nulls in runtime. --