const global = "from us";
fn bar(a: []const u8, b: []const u8) []const u8{
return a ++ b;
}
fn hello(a: []const u8, b: []const u8) []const u8 {
var barred = bar(a, b);
std.debug.print("THE BARRED {}", .{barred});
return "Hello" ++ barred ++ " " ++ global;
}
pub fn main() !void {
// Prints to stderr (it's a shortcut based on `std.io.getStdErr()`)
var result = hello("friends", "family");
std.debug.print("SOME STUFF{}", .{result});
}
this code is giving me the following error
./src/main.zig:14:21: error: unable to evaluate constant expression
return "Hello" ++ barred ++ " " ++ global;
^
./src/main.zig:7:9: error: unable to evaluate constant expression
return a ++ b;