diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2017-05-01 22:37:34 -0400 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2017-05-01 22:37:34 -0400 |
| commit | 9f92042da9a674bcef95f9ac18945371305e7f72 (patch) | |
| tree | eae251be6cea0f18ab5c623bedbde540be270063 /src | |
| parent | cff5358f60bac70728c9b738c8311e055e96d04a (diff) | |
| download | zig-9f92042da9a674bcef95f9ac18945371305e7f72.tar.gz zig-9f92042da9a674bcef95f9ac18945371305e7f72.zip | |
allow undefined to be resolved with other types
closes #295
Diffstat (limited to 'src')
| -rw-r--r-- | src/ir.cpp | 5 |
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) { |
