mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-25 17:01:11 +00:00
Reverse 'type: identifier' to 'identifier: type' in executable
semantics.
This commit is contained in:
1 parent
da403db9ff
commit
567b9bb5a4
61 files changed
+111
-111
No files matched your search
+4
-4
@@ -3,13 +3,13 @@
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
struct Point {
|
||||
var Int: x;
|
||||
var Int: y;
|
||||
var x: Int;
|
||||
var y: Int;
|
||||
}
|
||||
|
||||
fn main() -> Int {
|
||||
var auto: p1 = Point(.x = 1, .y = 2);
|
||||
var auto: p2 = p1;
|
||||
var p1: auto = Point(.x = 1, .y = 2);
|
||||
var p2: auto = p1;
|
||||
p2.x = 3;
|
||||
return p1.x - 1;
|
||||
}
|
||||
Reference in new issue
Block a user