mirror of
https://github.com/ziglang/zig.git
synced 2026-02-21 08:45:52 +00:00
std: Use @TypeOf(x,y) as return value for max
This commit is contained in:
parent
0c310f0fbf
commit
e029032251
@ -293,7 +293,7 @@ test "math.min" {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn max(x: var, y: var) @TypeOf(x + y) {
|
||||
pub fn max(x: var, y: var) @TypeOf(x, y) {
|
||||
return if (x > y) x else y;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user