Sema: fix segfault during resolveInferredErrorSet
There was a simple missing check of adding an inferred error set to itself, in which case we should not try to mutate the hash map while iterating over it.
This commit is contained in:
@@ -21549,6 +21549,7 @@ fn resolveInferredErrorSet(
|
||||
var it = ies.inferred_error_sets.keyIterator();
|
||||
while (it.next()) |other_error_set_ptr| {
|
||||
const other_ies: *Module.Fn.InferredErrorSet = other_error_set_ptr.*;
|
||||
if (ies == other_ies) continue;
|
||||
try sema.resolveInferredErrorSet(block, src, other_ies);
|
||||
|
||||
for (other_ies.errors.keys()) |key| {
|
||||
|
||||
Reference in New Issue
Block a user