Auto dereferencing is only for near pointers

This commit is contained in:
Mid 2025-10-09 11:36:44 +03:00
parent 8fc5521601
commit fc16c077d9

View File

@ -290,7 +290,7 @@ AST *nct_parse_expression(Parser *P, int lOP) {
Token op = P->tokens[P->i - 1];
if(op.type == TOKEN_DOT) {
while(type_is_any_pointer(e->expression.type)) {
while(e->expression.type->type == TYPE_TYPE_POINTER) {
AST *deref = alloc_node(P, sizeof(ASTExprUnaryOp));
deref->nodeKind = AST_EXPR_UNARY_OP;
deref->exprUnOp.operator = UNOP_DEREF;