Commit a5a406af by Brendan Kehoe

another expr/decl ambiguity test

From-SVN: r21826
parent ba6ac69e
// Build don't link:
// this is marked as an expected error because it evidences an
// ambiguity in the grammar between expressions and declarations.
// when the parser's been cleaned up or rewritten, the error
// marker can go away, since it'll no longer occur.
class B
{
public:
B( int t ) {}
void f() {}
};
int g() { return 0; }
main()
{
int try1;
B( try1 ).f(); // no syntax error
B b( g() ); // no syntax error
B( ::g() ).f(); // no syntax error
B( g() ).f(); // syntax error before `.' // ERROR -
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment