fix(generictest2): 去掉 generic_swap 的幽灵类型形参 [T]

T 未被签名/函数体任何位置引用,签名形参注解为 IntPair | t.CPtr,泛型函数类型实参推断无法为它找到形参槽(_annotation_refers_type_param 返回 0),触发 fail-fast(禁止静默默认 int)。该函数本就不需要泛型,去掉 [T] 即语义正确。
This commit is contained in:
TermiNexus committed 2026-10-03 15:20:33 +08:00
1 parent 7148f8b58d
commit 63cab96f53
1 file changed
+1 -1
+1 -1
View File
@@ -81,7 +81,7 @@ class IntPair:
a: t.CInt
b: t.CInt
def generic_swap[T](p: IntPair | t.CPtr):
def generic_swap(p: IntPair | t.CPtr):
tmp: t.CInt = c.Deref(p).a
c.Deref(p).a = c.Deref(p).b
c.Deref(p).b = tmp