if(bool = x) does not give a boolean result

Steven Schveighoffer schveiguy at yahoo.com
Fri May 7 11:52:46 PDT 2010


On Fri, 07 May 2010 14:42:15 -0400, Johan Granberg  
<lijat.meREM at ovegmail.com> wrote:


> This is all true but if this is how the feature should be defined I think
> the error message should improve. Something along the lines
> of, "Assignments not allowed as thruth values in conditional statments"
> seems more clear.

http://d.puremagic.com/issues/show_bug.cgi?id=4163

Feel free to add suggestions for the correct error message.  It was indeed  
the error message that had me puzzled as to whether it should be allowed  
or not.

-Steve


More information about the Digitalmars-d-learn mailing list