Chapter 20 makes the following statements about namespaces:
(1)
"All occurrence of a namespace-definition in a script must have the declaration-list form or must have the "semicolon" form; the two forms cannot be mixed."
This is correct.
(2) "The declaration-list must not contain a namespace-definition."
This is not correct. It should be legal to say
namespace foo {
namespace bar {
class C { }
}
new \foo\bar\C();
}
Chapter 20 makes the following statements about namespaces:
(1)
"All occurrence of a namespace-definition in a script must have the declaration-list form or must have the "semicolon" form; the two forms cannot be mixed."
This is correct.
(2) "The declaration-list must not contain a namespace-definition."
This is not correct. It should be legal to say
namespace foo { namespace bar { class C { } } new \foo\bar\C(); }
Now, it should still be illegal to say
namespace foo { namespace bar;
and so on, but this is covered by the first rule.
The second rule can simply be deleted.