| ... | ... | @@ -15804,9 +15804,26 @@ static void ir_make_type_info_defs(IrAnalyze *ira, ConstExprValue *out_val, Scop |
| 15804 | 15804 | |
| 15805 | 15805 | while ((curr_entry = decl_it.next()) != nullptr) |
| 15806 | 15806 | { |
| 15807 | | // Skip comptime blocks. |
| 15807 | // If the definition is unresolved, force it to be resolved again. |
| 15808 | if (curr_entry->value->resolution == TldResolutionUnresolved) |
| 15809 | { |
| 15810 | resolve_top_level_decl(ira->codegen, curr_entry->value, false, curr_entry->value->source_node); |
| 15811 | if (curr_entry->value->resolution != TldResolutionOk) |
| 15812 | { |
| 15813 | return; |
| 15814 | } |
| 15815 | } |
| 15816 | |
| 15817 | // Skip comptime blocks and test functions. |
| 15808 | 15818 | if (curr_entry->value->id != TldIdCompTime) |
| 15809 | 15819 | { |
| 15820 | if (curr_entry->value->id == TldIdFn) |
| 15821 | { |
| 15822 | FnTableEntry *fn_entry = ((TldFn *)curr_entry->value)->fn_entry; |
| 15823 | if (fn_entry->is_test) |
| 15824 | continue; |
| 15825 | } |
| 15826 | |
| 15810 | 15827 | definition_count += 1; |
| 15811 | 15828 | } |
| 15812 | 15829 | } |
| ... | ... | @@ -15825,9 +15842,15 @@ static void ir_make_type_info_defs(IrAnalyze *ira, ConstExprValue *out_val, Scop |
| 15825 | 15842 | int definition_index = 0; |
| 15826 | 15843 | while ((curr_entry = decl_it.next()) != nullptr) |
| 15827 | 15844 | { |
| 15828 | | // Skip comptime blocks |
| 15845 | // Skip comptime blocks and test functions. |
| 15829 | 15846 | if (curr_entry->value->id == TldIdCompTime) |
| 15830 | 15847 | continue; |
| 15848 | else if (curr_entry->value->id == TldIdFn) |
| 15849 | { |
| 15850 | FnTableEntry *fn_entry = ((TldFn *)curr_entry->value)->fn_entry; |
| 15851 | if (fn_entry->is_test) |
| 15852 | continue; |
| 15853 | } |
| 15831 | 15854 | |
| 15832 | 15855 | ConstExprValue *definition_val = &definition_array->data.x_array.s_none.elements[definition_index]; |
| 15833 | 15856 | |
| ... | ... | @@ -15878,7 +15901,10 @@ static void ir_make_type_info_defs(IrAnalyze *ira, ConstExprValue *out_val, Scop |
| 15878 | 15901 | { |
| 15879 | 15902 | // 2: Data.Fn: Data.FnDef |
| 15880 | 15903 | bigint_init_unsigned(&inner_fields[2].data.x_union.tag, 2); |
| 15881 | | // @TODO Data.FnDef |
| 15904 | |
| 15905 | FnTableEntry *fn_entry = ((TldFn *)curr_entry->value)->fn_entry; |
| 15906 | assert(!fn_entry->is_test); |
| 15907 | |
| 15882 | 15908 | inner_fields[2].data.x_union.payload = nullptr; |
| 15883 | 15909 | break; |
| 15884 | 15910 | } |