From 47ef8420a93bca114cabfe22f0c13ceebf48d964 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A0=95=EC=8B=9C=EC=9B=90?= Date: Sun, 16 Aug 2026 21:17:33 +0900 Subject: [PATCH] add optional type kind --- fec/src/types.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fec/src/types.h b/fec/src/types.h index 1974a46..5e1c984 100644 --- a/fec/src/types.h +++ b/fec/src/types.h @@ -6,7 +6,7 @@ typedef enum FeTypeKind { FE_TYPE_ERROR, FE_TYPE_ERROR_UNION, FE_TYPE_VOID, FE_TYPE_BOOL, FE_TYPE_CHAR, FE_TYPE_INT, FE_TYPE_STRUCT, FE_TYPE_ENUM, FE_TYPE_ARRAY, FE_TYPE_SLICE, FE_TYPE_STR, - FE_TYPE_REF, FE_TYPE_OWNED, FE_TYPE_UNKNOWN + FE_TYPE_REF, FE_TYPE_OWNED, FE_TYPE_OPTIONAL, FE_TYPE_UNKNOWN } FeTypeKind; typedef struct FeFieldType FeFieldType; @@ -49,7 +49,9 @@ struct FeType { unsigned long size; unsigned align; FeType *elem; - /* Success value for an error union; !void is represented directly. */ + /* Success value for an error union; !void is represented directly. + For a nominal E!T created by M7, elem holds E. A null elem denotes + the built-in core.Error shorthand !T. */ FeType *error_value; int ref_mut; FeFieldType *fields;