mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-29 15:15:14 +01:00
Initial support for parsing namespace declarations and referring to namespace names. No support for declaring members of namespaces yet.
19 lines
557 B
Plaintext
19 lines
557 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
|
|
// RUN: %{not} %{explorer-run}
|
|
// RUN: %{not} %{explorer-run-trace}
|
|
|
|
package ExplorerTest api;
|
|
|
|
namespace N;
|
|
|
|
fn F[T:! type](x: T) -> T { return x; }
|
|
|
|
fn Main() -> i32 {
|
|
// CHECK:STDERR: COMPILATION ERROR: {{.*}}/explorer/testdata/namespace/fail_use_as_value.carbon:[[@LINE+1]]: expected `.member_name` after name of namespace N
|
|
return F(N);
|
|
}
|