"bearophile" <[email protected]> wrote in message news:[email protected]... > > string[4] colors = ["red", > "blue" > "green", > "yellow"]; > void main() {} >
I hate this, a lot. > I have a bit of statistical proof that code like this is a common source > of bugs, and I'd like this to be statically disallowed > (http://d.puremagic.com/issues/show_bug.cgi?id=5409 ): > > (!x & y) > This would be a good dmd patch for you to tackle bearophile. Should be as simple as adding a check to the semantic routine of AndExp, looking at what type of expression e1 is.
