Skip to content

Commit 4aaf97b

Browse files
committed
@errSetCast is renamed into @errorcast
Relates to ziglang/zig#17343
1 parent 72704f0 commit 4aaf97b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/reflect.zig

+1-1
Original file line numberDiff line numberDiff line change
@@ -908,7 +908,7 @@ pub const Struct = struct {
908908
// TODO: the type of the error should be the one define in the ErroSet field
909909
// instead here we accept anyerror, see comment on throwError generate function
910910
// So the implementation API should deal with that, knowing that the runtime
911-
// error sent will be part of the ErrorSet (here an @errSetCast is possible)
911+
// error sent will be part of the ErrorSet (here an @errorCast is possible)
912912
if (!isDecl(
913913
T,
914914
"init",

src/tests/types_complex_test.zig

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ pub const MyException = struct {
104104
};
105105

106106
pub fn init(_: std.mem.Allocator, err: anyerror, _: []const u8) anyerror!MyException {
107-
return .{ .err = @as(ErrorSet, @errSetCast(err)) };
107+
return .{ .err = @as(ErrorSet, @errorCast(err)) };
108108
}
109109

110110
pub fn get_name(self: MyException) []const u8 {

0 commit comments

Comments
 (0)