Starting a new scope on class level results in misleading error message
Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=1134
Reported by Johan Schön js@roxen.com
The following (supposedly illegal) code:
-------------
int foo;
{
foo++;
}
-------------
gives the following, slightly misleading error message:
foo.pike:4:Identifier 'foo' is not a constant
foo.pike:4:parse error
Pike: Failed to compile script:
Compilation failed.
The reason I stumbled upon this was because I put a semicolor directly following a function definition line like this by mistake:
void bar();
{
foo++;
}