| ... | @@ -4233,13 +4233,10 @@ fn structDeclInner( | ... | @@ -4233,13 +4233,10 @@ fn structDeclInner( |
| 4233 | // are in scope, so that field types, alignments, and default value expressions | 4233 | // are in scope, so that field types, alignments, and default value expressions |
| 4234 | // can refer to decls within the struct itself. | 4234 | // can refer to decls within the struct itself. |
| 4235 | astgen.advanceSourceCursorToNode(node); | 4235 | astgen.advanceSourceCursorToNode(node); |
| 4236 | // If `node == 0` then this is the root struct and all the declarations should | | |
| 4237 | // be relative to the beginning of the file. | | |
| 4238 | const decl_line = if (node == 0) 0 else astgen.source_line; | | |
| 4239 | var block_scope: GenZir = .{ | 4236 | var block_scope: GenZir = .{ |
| 4240 | .parent = &namespace.base, | 4237 | .parent = &namespace.base, |
| 4241 | .decl_node_index = node, | 4238 | .decl_node_index = node, |
| 4242 | .decl_line = decl_line, | 4239 | .decl_line = gz.decl_line, |
| 4243 | .astgen = astgen, | 4240 | .astgen = astgen, |
| 4244 | .force_comptime = true, | 4241 | .force_comptime = true, |
| 4245 | .instructions = gz.instructions, | 4242 | .instructions = gz.instructions, |
| ... | @@ -4439,7 +4436,7 @@ fn unionDeclInner( | ... | @@ -4439,7 +4436,7 @@ fn unionDeclInner( |
| 4439 | var block_scope: GenZir = .{ | 4436 | var block_scope: GenZir = .{ |
| 4440 | .parent = &namespace.base, | 4437 | .parent = &namespace.base, |
| 4441 | .decl_node_index = node, | 4438 | .decl_node_index = node, |
| 4442 | .decl_line = astgen.source_line, | 4439 | .decl_line = gz.decl_line, |
| 4443 | .astgen = astgen, | 4440 | .astgen = astgen, |
| 4444 | .force_comptime = true, | 4441 | .force_comptime = true, |
| 4445 | .instructions = gz.instructions, | 4442 | .instructions = gz.instructions, |
| ... | @@ -4722,7 +4719,7 @@ fn containerDecl( | ... | @@ -4722,7 +4719,7 @@ fn containerDecl( |
| 4722 | var block_scope: GenZir = .{ | 4719 | var block_scope: GenZir = .{ |
| 4723 | .parent = &namespace.base, | 4720 | .parent = &namespace.base, |
| 4724 | .decl_node_index = node, | 4721 | .decl_node_index = node, |
| 4725 | .decl_line = astgen.source_line, | 4722 | .decl_line = gz.decl_line, |
| 4726 | .astgen = astgen, | 4723 | .astgen = astgen, |
| 4727 | .force_comptime = true, | 4724 | .force_comptime = true, |
| 4728 | .instructions = gz.instructions, | 4725 | .instructions = gz.instructions, |
| ... | @@ -4827,7 +4824,7 @@ fn containerDecl( | ... | @@ -4827,7 +4824,7 @@ fn containerDecl( |
| 4827 | var block_scope: GenZir = .{ | 4824 | var block_scope: GenZir = .{ |
| 4828 | .parent = &namespace.base, | 4825 | .parent = &namespace.base, |
| 4829 | .decl_node_index = node, | 4826 | .decl_node_index = node, |
| 4830 | .decl_line = astgen.source_line, | 4827 | .decl_line = gz.decl_line, |
| 4831 | .astgen = astgen, | 4828 | .astgen = astgen, |
| 4832 | .force_comptime = true, | 4829 | .force_comptime = true, |
| 4833 | .instructions = gz.instructions, | 4830 | .instructions = gz.instructions, |