lookup_scope.carbon 507 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. // AUTOUPDATE
  6. // CHECK:STDOUT: result: 6
  7. package ExplorerTest api;
  8. namespace N;
  9. fn OuterI32() -> type { return i32; }
  10. fn One() -> i32 { return 1; }
  11. fn N.I32() -> type { return i32; }
  12. fn N.Five() -> I32() { return 5; }
  13. fn N.Six() -> OuterI32() { return Five() + One(); }
  14. fn Main() -> i32 { return N.Six(); }