mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-25 17:20:15 +01:00
* global variables * implemented type checking of global variable, added test case * added a comment * improvements based on Dave's suggestions * improvements based on Jon's suggestions * added test cases about global variable ordering
12 lines
299 B
Plaintext
12 lines
299 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
|
|
|
|
// Test global variable initialization and read.
|
|
|
|
var Int: zero = 0;
|
|
|
|
fn main() -> Int {
|
|
return zero;
|
|
}
|