fix(narrow): ClassGenEnum pos_max 加宽为 sizet

pos_max 承接 variant_field_sizes 的 sizet 元素,仅与 sizet 比较并流入 sizet();原 int 触发 64->32 隐式窄化
This commit is contained in:
TermiNexus committed 2026-10-11 09:54:18 +08:00
1 parent 3c0d3d13b5
commit 7468b007f7
1 file changed
+1 -1
+1 -1
View File
@@ -738,7 +738,7 @@ novirtual class ClassGenEnum(ClassGenBase.ClassGenBase):
# Positions 1+: take the max field size across all variants at each position
for pos in range(1, total_positions):
pos_max: int = 0
pos_max: sizet = 0
for vi in range(variant_count):
if vi >= 64:
break # variant_field_sizes 64-class slot cap; guards against out-of-bounds reads