This compiles successfully, but I don't think it should.
//---------
void bar ()
{
foo (); // should fail
}
version(none):
void foo () {}
//---------
$ gdmd -c test.d
//---------
Comment #1 by afb — 2006-12-07T08:41:06Z
There is an error with that extra colon, after the version:
version(none)
void foo () {}
none.d:3: undefined identifier foo
none.d:3: function expected before (), not foo of type int
version(none)
{
void foo () {}
}
none.d:3: undefined identifier foo
none.d:3: function expected before (), not foo of type int
However, maybe having the colon should be made an error ?