| ... | @@ -22,11 +22,7 @@ test "simple generic fn" { | ... | @@ -22,11 +22,7 @@ test "simple generic fn" { |
| 22 | | 22 | |
| 23 | try expect(max(i32, 3, -1) == 3); | 23 | try expect(max(i32, 3, -1) == 3); |
| 24 | try expect(max(u8, 1, 100) == 100); | 24 | try expect(max(u8, 1, 100) == 100); |
| 25 | if (false) { | 25 | try expect(max(f32, 0.123, 0.456) == 0.456); |
| 26 | // TODO: zig is incorrectly emitting the following: | | |
| 27 | // error: cast of value 1.23e-01 to type 'f32' loses information | | |
| 28 | try expect(max(f32, 0.123, 0.456) == 0.456); | | |
| 29 | } | | |
| 30 | try expect(add(2, 3) == 5); | 26 | try expect(add(2, 3) == 5); |
| 31 | } | 27 | } |
| 32 | | 28 | |