@@ -2560,12 +2560,17 @@ pub fn populateTestFunctions(
2560
2560
pub fn linkerUpdateNav (pt : Zcu.PerThread , nav_index : InternPool.Nav.Index ) ! void {
2561
2561
const zcu = pt .zcu ;
2562
2562
const comp = zcu .comp ;
2563
+ const ip = & zcu .intern_pool ;
2563
2564
2564
2565
const nav = zcu .intern_pool .getNav (nav_index );
2565
- const codegen_prog_node = zcu .codegen_prog_node .start (nav .fqn .toSlice (& zcu . intern_pool ), 0 );
2566
+ const codegen_prog_node = zcu .codegen_prog_node .start (nav .fqn .toSlice (ip ), 0 );
2566
2567
defer codegen_prog_node .end ();
2567
2568
2568
- if (comp .bin_file ) | lf | {
2569
+ if (! Air .valFullyResolved (zcu .navValue (nav_index ), zcu )) {
2570
+ // The value of this nav failed to resolve. This is a transitive failure.
2571
+ // TODO: do we need to mark this failure anywhere? I don't think so, since compilation
2572
+ // will fail due to the type error anyway.
2573
+ } else if (comp .bin_file ) | lf | {
2569
2574
lf .updateNav (pt , nav_index ) catch | err | switch (err ) {
2570
2575
error .OutOfMemory = > return error .OutOfMemory ,
2571
2576
error .AnalysisFail = > {
@@ -2605,7 +2610,11 @@ pub fn linkerUpdateContainerType(pt: Zcu.PerThread, ty: InternPool.Index) !void
2605
2610
const codegen_prog_node = zcu .codegen_prog_node .start (Type .fromInterned (ty ).containerTypeName (ip ).toSlice (ip ), 0 );
2606
2611
defer codegen_prog_node .end ();
2607
2612
2608
- if (comp .bin_file ) | lf | {
2613
+ if (! Air .typeFullyResolved (Type .fromInterned (ty ), zcu )) {
2614
+ // This type failed to resolve. This is a transitive failure.
2615
+ // TODO: do we need to mark this failure anywhere? I don't think so, since compilation
2616
+ // will fail due to the type error anyway.
2617
+ } else if (comp .bin_file ) | lf | {
2609
2618
lf .updateContainerType (pt , ty ) catch | err | switch (err ) {
2610
2619
error .OutOfMemory = > return error .OutOfMemory ,
2611
2620
else = > | e | log .err ("codegen type failed: {s}" , .{@errorName (e )}),
0 commit comments