star.carbon 436 B

12345678910111213141516
  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. // Never actually called, so this only tests typechecking and semantic analysis.
  5. fn F(n: Int, p: Int*, q: Int***) -> Int* {
  6. var a: Int = n * *p;
  7. var b: Int = a*n;
  8. *p = b*(*p);
  9. **q = p;
  10. return **q;
  11. }
  12. fn main() -> Int {
  13. return 0;
  14. }