mirror of
https://github.com/ziglang/zig.git
synced 2026-02-17 23:10:09 +00:00
Revert "fix return types of min amd max"
This reverts commit 180fe8d506d9253532f593bab4605f752eff0ffc.
This commit is contained in:
parent
180fe8d506
commit
848504117f
@ -180,7 +180,7 @@ pub const Cmp = enum {
|
||||
Greater,
|
||||
};
|
||||
|
||||
pub fn min(x: var, y: var) -> @typeOf(if (x < y) x else y) {
|
||||
pub fn min(x: var, y: var) -> @typeOf(x + y) {
|
||||
if (x < y) x else y
|
||||
}
|
||||
|
||||
@ -188,7 +188,7 @@ test "math.min" {
|
||||
assert(min(i32(-1), i32(2)) == -1);
|
||||
}
|
||||
|
||||
pub fn max(x: var, y: var) -> @typeOf(if (x > y) x else y) {
|
||||
pub fn max(x: var, y: var) -> @typeOf(x + y) {
|
||||
if (x > y) x else y
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user