| ... | @@ -5008,6 +5008,7 @@ fn ifExpr( | ... | @@ -5008,6 +5008,7 @@ fn ifExpr( |
| 5008 | const token_name_str = tree.tokenSlice(token_name_index); | 5008 | const token_name_str = tree.tokenSlice(token_name_index); |
| 5009 | if (mem.eql(u8, "_", token_name_str)) | 5009 | if (mem.eql(u8, "_", token_name_str)) |
| 5010 | break :s &then_scope.base; | 5010 | break :s &then_scope.base; |
| | 5011 | try astgen.detectLocalShadowing(&then_scope.base, ident_name, token_name_index); |
| 5011 | payload_val_scope = .{ | 5012 | payload_val_scope = .{ |
| 5012 | .parent = &then_scope.base, | 5013 | .parent = &then_scope.base, |
| 5013 | .gen_zir = &then_scope, | 5014 | .gen_zir = &then_scope, |
| ... | @@ -5030,6 +5031,7 @@ fn ifExpr( | ... | @@ -5030,6 +5031,7 @@ fn ifExpr( |
| 5030 | break :s &then_scope.base; | 5031 | break :s &then_scope.base; |
| 5031 | const payload_inst = try then_scope.addUnNode(tag, cond.inst, node); | 5032 | const payload_inst = try then_scope.addUnNode(tag, cond.inst, node); |
| 5032 | const ident_name = try astgen.identAsString(ident_token); | 5033 | const ident_name = try astgen.identAsString(ident_token); |
| | 5034 | try astgen.detectLocalShadowing(&then_scope.base, ident_name, ident_token); |
| 5033 | payload_val_scope = .{ | 5035 | payload_val_scope = .{ |
| 5034 | .parent = &then_scope.base, | 5036 | .parent = &then_scope.base, |
| 5035 | .gen_zir = &then_scope, | 5037 | .gen_zir = &then_scope, |
| ... | @@ -5071,6 +5073,7 @@ fn ifExpr( | ... | @@ -5071,6 +5073,7 @@ fn ifExpr( |
| 5071 | const error_token_str = tree.tokenSlice(error_token); | 5073 | const error_token_str = tree.tokenSlice(error_token); |
| 5072 | if (mem.eql(u8, "_", error_token_str)) | 5074 | if (mem.eql(u8, "_", error_token_str)) |
| 5073 | break :s &else_scope.base; | 5075 | break :s &else_scope.base; |
| | 5076 | try astgen.detectLocalShadowing(&else_scope.base, ident_name, error_token); |
| 5074 | payload_val_scope = .{ | 5077 | payload_val_scope = .{ |
| 5075 | .parent = &else_scope.base, | 5078 | .parent = &else_scope.base, |
| 5076 | .gen_zir = &else_scope, | 5079 | .gen_zir = &else_scope, |