summaryrefslogtreecommitdiff
path: root/cgen.c
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2020-04-23 15:58:51 -0400
committerLeo Tenenbaum <pommicket@gmail.com>2020-04-23 15:58:51 -0400
commit9db4ea5189f6f1a8b264c9948090c822f5e008b1 (patch)
treeba181369ebff8160bf8b3c8dba4236c02bc6e1e5 /cgen.c
parentdf03769e7bad52137bfe685035e2e4ece2bcd044 (diff)
made EXPR_IDENT a string before typing
Diffstat (limited to 'cgen.c')
-rw-r--r--cgen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cgen.c b/cgen.c
index b2d64f2..f73debd 100644
--- a/cgen.c
+++ b/cgen.c
@@ -1349,7 +1349,7 @@ static void cgen_expr(CGenerator *g, Expression *e) {
cgen_expr(g, lhs);
bool is_ptr = lhs->type.kind == TYPE_PTR;
cgen_write(g, is_ptr ? "->" :".");
- cgen_ident_simple(g, e->binary.dot.field->name);
+ cgen_ident_simple(g, e->binary.field->name);
cgen_write(g, ")");
} else if (struct_type->kind == TYPE_SLICE) {
/* access slice data */