aboutsummaryrefslogtreecommitdiff
path: root/src/ir.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ir.cpp')
-rw-r--r--src/ir.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/ir.cpp b/src/ir.cpp
index 75c49dc53a..941210d583 100644
--- a/src/ir.cpp
+++ b/src/ir.cpp
@@ -6120,6 +6120,15 @@ static TypeTableEntry *ir_resolve_peer_types(IrAnalyze *ira, AstNode *source_nod
{
prev_inst = cur_inst;
continue;
+ } else if (prev_type->id == TypeTableEntryIdMaybe &&
+ types_match_const_cast_only(prev_type->data.maybe.child_type, cur_type))
+ {
+ continue;
+ } else if (cur_type->id == TypeTableEntryIdMaybe &&
+ types_match_const_cast_only(cur_type->data.maybe.child_type, prev_type))
+ {
+ prev_inst = cur_inst;
+ continue;
} else if (prev_type->id == TypeTableEntryIdNumLitInt ||
prev_type->id == TypeTableEntryIdNumLitFloat)
{