Bracketed expression == convert?

Yossarian phoenix at flareware.cz
Sun Jul 2 07:00:10 PDT 2006


consider following code:

import std.stdio;
const int t = 0;
void main()
{
	writefln("%d", (t) - 1);
}

(i think it's completelly legal, but compiler explains:
C style cast illegal, use cast(t)-1

is it a bug, or a feature?



More information about the Digitalmars-d mailing list