zig-learn/test-str.zig

11 lines
242 B
Zig
Raw Permalink Normal View History

2024-10-30 09:38:15 +00:00
pub fn main() void {
_ = ohyes("sdf"); // everything is fine
}
fn ohyes(str: []const u8) []const u8 {
//const foo = "ohyes";
_ = str;
return "sdfg"; // foo is already a pointer, or rather
// foo was a pointer all along
}