1 matches bool, 2 matches long

Walter Bright newshound2 at digitalmars.com
Fri Apr 26 11:22:10 PDT 2013


On 4/26/2013 6:51 AM, deadalnix wrote:
> The last time I experienced that feature was with a char getting casted to bool
> implicitly and then appended to a string, causing super weird behavior after
> when using the resulting (corrupted) string.


void main()
{
     bool b = 'c';
}

dmd -c foo
foo.d(4): Error: cannot implicitly convert expression ('c') of type char to bool


More information about the Digitalmars-d mailing list