feat: nested multi-field enum patterns (bootstrap + selfhost)

Multi-field variants use Enum_Variant_Payload nested types (avoids tag name clash).
Sema resolves data.Variant.Variant_i; enum field types fully resolve tuples.
Selfhost parses full type exprs in enum payloads; emit structs/tuples before enums.
Example: examples/nested_patterns.bux (Pair::Two, Box::Val((a,c)), Shape::Dot).
This commit is contained in:
2026-07-18 01:33:36 +03:00
parent f9185c96b2
commit 66f11d1869
12 changed files with 383 additions and 209 deletions
+2
View File
@@ -126,8 +126,10 @@ struct HirEnumVariant {
fieldCount: int;
fieldType0: int;
fieldName0: String;
fieldTypeName0: String; // C type name (e.g. "int", "Tuple_int_int")
fieldType1: int;
fieldName1: String;
fieldTypeName1: String;
}
// ---------------------------------------------------------------------------