From 476bacc27671de92e8fdbc5b2a904bbf8bc80377 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 24 Aug 2025 17:07:41 -0400 Subject: More splitting out into separate files. --- src/compile/enums.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/compile/enums.c') diff --git a/src/compile/enums.c b/src/compile/enums.c index f09d41ba..1e20f5bf 100644 --- a/src/compile/enums.c +++ b/src/compile/enums.c @@ -9,8 +9,10 @@ #include "../stdlib/tables.h" #include "../stdlib/text.h" #include "../typecheck.h" +#include "assignments.h" #include "pointers.h" #include "structs.h" +#include "types.h" Text_t compile_enum_typeinfo(env_t *env, ast_t *ast) { DeclareMatch(def, ast, EnumDef); @@ -157,7 +159,7 @@ Text_t compile_empty_enum(type_t *t) { public Text_t compile_enum_field_access(env_t *env, ast_t *ast) { DeclareMatch(f, ast, FieldAccess); - type_t *fielded_t = get_type(env, ast); + type_t *fielded_t = get_type(env, f->fielded); type_t *value_t = value_type(fielded_t); DeclareMatch(e, value_t, EnumType); for (tag_t *tag = e->tags; tag; tag = tag->next) { -- cgit v1.2.3