Sobeston / zig.guide

Repo for https://zig.guide content. Get up to speed with Zig quickly.
https://zig.guide
MIT License
688 stars 178 forks source link

Update orelse typeof in optionals #234

Closed SpandanBG closed 6 months ago

SpandanBG commented 6 months ago

I was going through the example code for the orelse section in the options and noticed a discrepancy on the line try expect(@TypeOf(b) == f32);. Upon inspection, I got that the type of b is comptime_int.

Please let me know if this is incorrect. Or if something is missing.

image

Sobeston commented 6 months ago

Closed in favour of https://github.com/Sobeston/zig.guide/commit/51f80b5fc8f25aec2a470109ee3826ce1d8281da - I should have added testing for this before, thanks for the report!