test_comptime_invalid_error_set_cast.zig (190B) - Raw
1 const Set1 = error{ 2 A, 3 B, 4 }; 5 const Set2 = error{ 6 A, 7 C, 8 }; 9 comptime { 10 _ = @as(Set2, @errorCast(Set1.B)); 11 } 12 13 // test_error='error.B' not a member of error set 'error{A,C}'