We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ec243ce commit d4438aaCopy full SHA for d4438aa
src/main.zig
@@ -644,7 +644,7 @@ pub const Interface = struct {
644
/// if there's a mismatch. When this convention doesn't work, use @fieldParentPtr directly.
645
pub fn downcast(comptime Implementer: type, interface_ref: anytype) *Implementer {
646
const field_name = comptime std.meta.fieldNames(Implementer).*[0];
647
- return @fieldParentPtr(field_name, interface_ref);
+ return @alignCast(@fieldParentPtr(field_name, interface_ref));
648
}
649
650
/// Instantiates an interface type and populates its function pointers to point to
0 commit comments