mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-25 06:20:11 +01:00
The presence or absence of whitespace is used to determine which operator is in use, following the rules described in #520. Support for prefix * dereference operator follows #523. Co-authored-by: Geoff Romer <gromer@google.com>
17 lines
436 B
Plaintext
17 lines
436 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
|
|
|
|
// Never actually called, so this only tests typechecking and semantic analysis.
|
|
fn F(n: Int, p: Int*, q: Int***) -> Int* {
|
|
var a: Int = n * *p;
|
|
var b: Int = a*n;
|
|
*p = b*(*p);
|
|
**q = p;
|
|
return **q;
|
|
}
|
|
|
|
fn main() -> Int {
|
|
return 0;
|
|
}
|