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

This commit is contained in:
Andrew Kelley 2018-02-03 14:42:20 -05:00
parent ef5e7bb469
commit 61718742f7
3 changed files with 6 additions and 6 deletions

View File

@ -6577,11 +6577,11 @@ static ConstCastOnly types_match_const_cast_only(IrAnalyze *ira, TypeTableEntry
TypeTableEntry *contained_set = actual_type;
TypeTableEntry *container_set = expected_type;
if (!resolve_inferred_error_set(ira, container_set, source_node)) {
result.id = ConstCastResultIdUnresolvedInferredErrSet;
// if the container set is inferred, then this will always work.
if (container_set->data.error_set.infer_fn != nullptr) {
return result;
}
// if the container set is the global one, it will always work.
if (type_is_global_error_set(container_set)) {
return result;
}

View File

@ -28,7 +28,7 @@ pub const ChildProcess = struct {
pub stdout: ?io.File,
pub stderr: ?io.File,
pub term: ?SpawnError!Term,
pub term: ?(SpawnError!Term),
pub argv: []const []const u8,

View File

@ -1515,7 +1515,7 @@ const unexpected_error_tracing = false;
/// Call this when you made a syscall or something that sets errno
/// and you get an unexpected error.
pub fn unexpectedErrorPosix(errno: usize) error {
pub fn unexpectedErrorPosix(errno: usize) (error{Unexpected}) {
if (unexpected_error_tracing) {
debug.warn("unexpected errno: {}\n", errno);
debug.dumpStackTrace();
@ -1525,7 +1525,7 @@ pub fn unexpectedErrorPosix(errno: usize) error {
/// Call this when you made a windows DLL call or something that does SetLastError
/// and you get an unexpected error.
pub fn unexpectedErrorWindows(err: windows.DWORD) error {
pub fn unexpectedErrorWindows(err: windows.DWORD) (error{Unexpected}) {
if (unexpected_error_tracing) {
debug.warn("unexpected GetLastError(): {}\n", err);
debug.dumpStackTrace();