You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
const std = @import("std");
const math = std.math;
pub fn Gen(comptime val: u32) type
{
const UType = @IntType(false, math.ceil(val));
const S = struct
{
code_len: UType,
};
return S;
}
test "Crash"
{
const G = Gen(8);
}
I haven't been able to minimize the circumstances further than the above. As you can see, math.ceil is passed an incorrect type and should produce an error message communicating that. For some reason, this specific construction instead causes a compiler crash.