Files
Viper_RegressionTesting/G7/includes/conflict_node.vp
T
TermiNexus f5da836fbb chore(test): 迁移测试夹具到新语法
机械规则 R2/R3/R4/R6/R7/R8/R13 + R16 保守子集,共 86 文件 2127 行。R1(T | t.CPtr)与 R12(while 下标循环)未做,仍列为待办。全量 77/77 顺序回归通过。
2026-10-05 19:59:02 +08:00

31 lines
896 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import t
from linkedlist import GSListNode
# ============================================================
# 最小化复现:类名 'Value' 与全局变量名冲突
#
# 这个类在 includes 目录中(走 Phase1 路径),生成 stub.ll
# 继承 GSListNode[Value] 获取 Next 字段
# 5 个自有字段 + 1 个继承字段(Next) = 6 字段
#
# 若 _get_or_create_struct('Value') 因 SymbolTable 中
# IsVariable=True 而返回 _TypedPointerType,
# 则 set_body 被跳过,struct 保持不完整 → GEP 越界崩溃
# ============================================================
@t.NoVTable
class Value(GSListNode[Value]):
Ty: t.CPtr
Name: t.CPtr
IsConst: int
IntVal: int64
FloatVal: double
def __init__(self):
self.Ty = None
self.Name = None
self.IsConst = 0
self.IntVal = 0
self.FloatVal = 0.0
self.Next = None