| ... | ... | @@ -21624,6 +21624,15 @@ static IrInstGen *ir_analyze_container_member_access_inner(IrAnalyze *ira, |
| 21624 | 21624 | if (tld->resolution == TldResolutionResolving) |
| 21625 | 21625 | return ir_error_dependency_loop(ira, source_instr); |
| 21626 | 21626 | |
| 21627 | if (tld->visib_mod == VisibModPrivate && |
| 21628 | tld->import != get_scope_import(source_instr->scope)) |
| 21629 | { |
| 21630 | ErrorMsg *msg = ir_add_error(ira, source_instr, |
| 21631 | buf_sprintf("'%s' is private", buf_ptr(field_name))); |
| 21632 | add_error_note(ira->codegen, msg, tld->source_node, buf_sprintf("declared here")); |
| 21633 | return ira->codegen->invalid_inst_gen; |
| 21634 | } |
| 21635 | |
| 21627 | 21636 | TldFn *tld_fn = (TldFn *)tld; |
| 21628 | 21637 | ZigFn *fn_entry = tld_fn->fn_entry; |
| 21629 | 21638 | assert(fn_entry != nullptr); |