Hi,
For zig 0.10.0, this compiles without an error. Where's the flaw in my mental model?
const Point = struct {
x: u32,
y: u32,
// Parse a string '123,456' as a point.
fn parse(s: []const u8) Point {
// write string parser function
_ = s;
}
};
pub fn main() !void {
}
Shouldn't the compiler complain that parse has not the correct return type or doesn't return anything at all, respectively?