aboutsummaryrefslogtreecommitdiff
path: root/src/ir.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2017-05-01 22:37:34 -0400
committerAndrew Kelley <superjoe30@gmail.com>2017-05-01 22:37:34 -0400
commit9f92042da9a674bcef95f9ac18945371305e7f72 (patch)
treeeae251be6cea0f18ab5c623bedbde540be270063 /src/ir.cpp
parentcff5358f60bac70728c9b738c8311e055e96d04a (diff)
downloadzig-9f92042da9a674bcef95f9ac18945371305e7f72.tar.gz
zig-9f92042da9a674bcef95f9ac18945371305e7f72.zip
allow undefined to be resolved with other types
closes #295
Diffstat (limited to 'src/ir.cpp')
-rw-r--r--src/ir.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ir.cpp b/src/ir.cpp
index 3ebb7415c9..3c2d7b7d34 100644
--- a/src/ir.cpp
+++ b/src/ir.cpp
@@ -6156,6 +6156,11 @@ static TypeTableEntry *ir_resolve_peer_types(IrAnalyze *ira, AstNode *source_nod
{
prev_inst = cur_inst;
continue;
+ } else if (cur_type->id == TypeTableEntryIdUndefLit) {
+ continue;
+ } else if (prev_type->id == TypeTableEntryIdUndefLit) {
+ prev_inst = cur_inst;
+ continue;
} else if (prev_type->id == TypeTableEntryIdNumLitInt ||
prev_type->id == TypeTableEntryIdNumLitFloat)
{