-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
broken LLVM module on use of optional slice #4907
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Milestone
Comments
The test case can be further simplified: fn fu(x: var, y: @TypeOf(x)) void {}
test "crash" {
var x0: ?[]const u8 = null;
var x1: ?[]u8 = null;
fu(x0, x1);
} |
certainly not simpler, but looks like I ran into this when updating zig-vulkan-triangle, too: https://gist.github.com/shakesoda/28eb50428eb683ce677b8b1903a57473 |
Even simpler case: fn fu(x: ?[]const u8) void {}
export fn bar() void {
var x1: ?[]u8 = null;
fu(x1);
} The problem is caused by zig generating two different LLVM types for const and non-const optional slices. |
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Possible duplicate of #4904
The text was updated successfully, but these errors were encountered: