std: Use @TypeOf(x,y) as return value for max

This commit is contained in:
LemonBoy 2020-03-04 10:56:01 +01:00 committed by Andrew Kelley
parent 0c310f0fbf
commit e029032251
No known key found for this signature in database
GPG Key ID: 7C5F548F728501A9

View File

@ -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;
}