builtin_in_namespace.carbon 527 B

12345678910111213141516171819
  1. // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. // Exceptions. See /LICENSE for license information.
  3. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. //
  5. // NOAUTOUPDATE
  6. package ExplorerTest api;
  7. namespace Namespace;
  8. // This does not interfere with the builtin `AddWith`, nor with the declaration
  9. // of `F` below.
  10. interface Namespace.AddWith {}
  11. fn F[T:! AddWith(i32) where .Result = i32](n: T) -> i32 { return n + 1; }
  12. fn Main() -> i32 { return F(1); }
  13. // CHECK:STDOUT: result: 2