| ... | @@ -3279,6 +3279,11 @@ fn analyzeCall( | ... | @@ -3279,6 +3279,11 @@ fn analyzeCall( |
| 3279 | | 3279 | |
| 3280 | namespace.anon_decls.putAssumeCapacityNoClobber(new_decl, {}); | 3280 | namespace.anon_decls.putAssumeCapacityNoClobber(new_decl, {}); |
| 3281 | | 3281 | |
| | 3282 | // The generic function Decl is guaranteed to be the first dependency |
| | 3283 | // of each of its instantiations. |
| | 3284 | assert(new_decl.dependencies.keys().len == 0); |
| | 3285 | try mod.declareDeclDependency(new_decl, module_fn.owner_decl); |
| | 3286 | |
| 3282 | var new_decl_arena = std.heap.ArenaAllocator.init(sema.gpa); | 3287 | var new_decl_arena = std.heap.ArenaAllocator.init(sema.gpa); |
| 3283 | errdefer new_decl_arena.deinit(); | 3288 | errdefer new_decl_arena.deinit(); |
| 3284 | | 3289 | |
| ... | @@ -3411,11 +3416,6 @@ fn analyzeCall( | ... | @@ -3411,11 +3416,6 @@ fn analyzeCall( |
| 3411 | }); | 3416 | }); |
| 3412 | assert(!new_decl.ty.fnInfo().is_generic); | 3417 | assert(!new_decl.ty.fnInfo().is_generic); |
| 3413 | | 3418 | |
| 3414 | // The generic function Decl is guaranteed to be the first dependency | | |
| 3415 | // of each of its instantiations. | | |
| 3416 | assert(new_decl.dependencies.keys().len == 0); | | |
| 3417 | try mod.declareDeclDependency(new_decl, module_fn.owner_decl); | | |
| 3418 | | | |
| 3419 | // Queue up a `codegen_func` work item for the new Fn. The `comptime_args` field | 3419 | // Queue up a `codegen_func` work item for the new Fn. The `comptime_args` field |
| 3420 | // will be populated, ensuring it will have `analyzeBody` called with the ZIR | 3420 | // will be populated, ensuring it will have `analyzeBody` called with the ZIR |
| 3421 | // parameters mapped appropriately. | 3421 | // parameters mapped appropriately. |