global_variable7.6c 328 B

123456789101112131415
  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. // Test a global variable depending on a function.
  5. fn f() -> Int {
  6. return 0;
  7. }
  8. var Int: y = f();
  9. fn main() -> Int {
  10. return y;
  11. }