aboutsummaryrefslogtreecommitdiff
path: root/src/ir.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2018-02-03 14:42:20 -0500
committerAndrew Kelley <superjoe30@gmail.com>2018-02-03 14:42:20 -0500
commit61718742f7f20cde1469d4db811cd6dd6c3f8266 (patch)
treeb2afa02e3212b4e1259c011c999155fc991d46fb /src/ir.cpp
parentef5e7bb4693ed7e1582fb0b68cab01e00638d615 (diff)
downloadzig-61718742f7f20cde1469d4db811cd6dd6c3f8266.tar.gz
zig-61718742f7f20cde1469d4db811cd6dd6c3f8266.zip
*WIP* error sets - std lib test compile but try to link against windows
Diffstat (limited to 'src/ir.cpp')
-rw-r--r--src/ir.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ir.cpp b/src/ir.cpp
index 06b46646e8..56ead2b906 100644
--- a/src/ir.cpp
+++ b/src/ir.cpp
@@ -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;
}