Files
carbon-lang/explorer/testdata/namespace/fail_use_as_value.carbon
T
Richard Smith 60af531f5b Support parsing namespace declarations (#2563)
Initial support for parsing namespace declarations and referring to namespace names. No support for declaring members of namespaces yet.
2023-01-30 17:25:44 -08:00

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);
}