Open
Description
Zig Version
0.14.1
Steps to Reproduce and Observed Output
run zig init
, replace src/main.zig
contents with this and run zig build
const std = @import("std");
pub fn main() !void {
std.debug.print("wont compile {}\n", .{Enum.parse("kekeke")});
}
const Enum = enum {
a,
b,
fn parse(method_str: []const u8) TricksterUnion {
return std.meta.stringToEnum(Enum, method_str).?;
}
};
const TricksterUnion = union(Enum) { a, b };
the only error (without any stack trace or anything)
error: Intrinsic has incorrect argument type!
ptr @llvm.memcpy.p0.i1.i64
LLVM ERROR: Broken module found, compilation aborted!
Expected Output
Compiled executable