mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-29 07:14:58 +01:00
Breaking apart namespaces from the main declaration list is, I think, the most scalable approach to this. If we have more divergence in supported declarations it gives a fairly straightforward way for splitting, and roughly mirrors how class_body splits. Fixes #2980
15 lines
414 B
Plaintext
15 lines
414 B
Plaintext
// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
|
|
// Exceptions. See /LICENSE for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
// AUTOUPDATE
|
|
|
|
package Foo api;
|
|
|
|
class C {
|
|
// CHECK:STDERR: SYNTAX ERROR: fail_member_namespace.carbon:[[@LINE+1]]: syntax error, unexpected NAMESPACE, expecting CLASS
|
|
namespace N;
|
|
}
|
|
|
|
fn Main() -> i32 { return 0; }
|