Skip to content

Commit e40a57c

Browse files
committed
fixed another issue with private fields on structs
1 parent 2ae7e8f commit e40a57c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/parser/righthand/field_access.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ Node* parse_field_access(Node* lefthand, Parser* parser) {
4646

4747
ssize_t found_index = -1;
4848
for(ssize_t i = 0; i < len(struct_type->fields); i++) {
49-
if(streq(field_token.trace.source, struct_type->fields[i].identifier) && !struct_type->fields[i].private) {
49+
if(streq(field_token.trace.source, struct_type->fields[i].identifier)
50+
&& !(struct_type->fields[i].private && struct_type->module->scope->flags & fPrivate)) {
5051
found_index = i;
5152
}
5253
}

0 commit comments

Comments
 (0)