mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-18 20:50:29 +00:00
Note this doesn't support other sizes or types, it just errors on them. Co-authored-by: Geoff Romer <gromer@google.com>
This commit is contained in:
1 parent
7e91fbc276
commit
2620ba066d
100 files changed
+212
-202
No files matched your search
@@ -6,8 +6,8 @@ fn map[T:! Type](f: fnty (T) -> T, tuple: (T, T)) -> (T, T) {
|
||||
return (f(tuple[0]), f(tuple[1]));
|
||||
}
|
||||
|
||||
fn inc(x: Int) -> Int { return x + 1; }
|
||||
fn inc(x: i32) -> i32 { return x + 1; }
|
||||
|
||||
fn main() -> Int {
|
||||
fn main() -> i32 {
|
||||
return map(inc, (0, 2))[0];
|
||||
}
|
||||
Reference in new issue
Block a user