authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-02-03 14:42:20-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-02-03 14:42:20-05:00
log61718742f7f20cde1469d4db811cd6dd6c3f8266
treeb2afa02e3212b4e1259c011c999155fc991d46fb
parentef5e7bb4693ed7e1582fb0b68cab01e00638d615

*WIP* error sets - std lib test compile but try to link against windows


3 files changed, 6 insertions(+), 6 deletions(-)

src/ir.cpp+3-3
......@@ -6577,11 +6577,11 @@ static ConstCastOnly types_match_const_cast_only(IrAnalyze *ira, TypeTableEntry
65776577 TypeTableEntry *contained_set = actual_type;
65786578 TypeTableEntry *container_set = expected_type;
65796579
6580 if (!resolve_inferred_error_set(ira, container_set, source_node)) {
6581 result.id = ConstCastResultIdUnresolvedInferredErrSet;
6580 // if the container set is inferred, then this will always work.
6581 if (container_set->data.error_set.infer_fn != nullptr) {
65826582 return result;
65836583 }
6584
6584 // if the container set is the global one, it will always work.
65856585 if (type_is_global_error_set(container_set)) {
65866586 return result;
65876587 }
std/os/child_process.zig+1-1
......@@ -28,7 +28,7 @@ pub const ChildProcess = struct {
2828 pub stdout: ?io.File,
2929 pub stderr: ?io.File,
3030
31 pub term: ?SpawnError!Term,
31 pub term: ?(SpawnError!Term),
3232
3333 pub argv: []const []const u8,
3434
std/os/index.zig+2-2
......@@ -1515,7 +1515,7 @@ const unexpected_error_tracing = false;
15151515
15161516/// Call this when you made a syscall or something that sets errno
15171517/// and you get an unexpected error.
1518pub fn unexpectedErrorPosix(errno: usize) error {
1518pub fn unexpectedErrorPosix(errno: usize) (error{Unexpected}) {
15191519 if (unexpected_error_tracing) {
15201520 debug.warn("unexpected errno: {}\n", errno);
15211521 debug.dumpStackTrace();
......@@ -1525,7 +1525,7 @@ pub fn unexpectedErrorPosix(errno: usize) error {
15251525
15261526/// Call this when you made a windows DLL call or something that does SetLastError
15271527/// and you get an unexpected error.
1528pub fn unexpectedErrorWindows(err: windows.DWORD) error {
1528pub fn unexpectedErrorWindows(err: windows.DWORD) (error{Unexpected}) {
15291529 if (unexpected_error_tracing) {
15301530 debug.warn("unexpected GetLastError(): {}\n", err);
15311531 debug.dumpStackTrace();