| ... | ... | @@ -7934,11 +7934,20 @@ static ImplicitCastMatchResult ir_types_match_with_implicit_cast(IrAnalyze *ira, |
| 7934 | 7934 | return ImplicitCastMatchResultReportedError; |
| 7935 | 7935 | } |
| 7936 | 7936 | |
| 7937 | // implicit conversion from ?T to ?U |
| 7938 | if (expected_type->id == TypeTableEntryIdMaybe && actual_type->id == TypeTableEntryIdMaybe) { |
| 7939 | ImplicitCastMatchResult res = ir_types_match_with_implicit_cast(ira, expected_type->data.maybe.child_type, |
| 7940 | actual_type->data.maybe.child_type, value); |
| 7941 | if (res != ImplicitCastMatchResultNo) |
| 7942 | return res; |
| 7943 | } |
| 7944 | |
| 7937 | 7945 | // implicit conversion from non maybe type to maybe type |
| 7938 | | if (expected_type->id == TypeTableEntryIdMaybe && |
| 7939 | | ir_types_match_with_implicit_cast(ira, expected_type->data.maybe.child_type, actual_type, value)) |
| 7940 | | { |
| 7941 | | return ImplicitCastMatchResultYes; |
| 7946 | if (expected_type->id == TypeTableEntryIdMaybe) { |
| 7947 | ImplicitCastMatchResult res = ir_types_match_with_implicit_cast(ira, expected_type->data.maybe.child_type, |
| 7948 | actual_type, value); |
| 7949 | if (res != ImplicitCastMatchResultNo) |
| 7950 | return res; |
| 7942 | 7951 | } |
| 7943 | 7952 | |
| 7944 | 7953 | // implicit conversion from null literal to maybe type |