Validation / Typecheck (push) Has been cancelled
Validation / Style (push) Has been cancelled
Validation / Test macos-latest (push) Has been cancelled
Validation / Test ubuntu-latest (push) Has been cancelled
Validation / Test windows-latest (push) Has been cancelled
Validation / Build (push) Has been cancelled
Validation / Required (push) Has been cancelled
指针隐式转换收紧后,结构体分支只认 isDerivedFrom(src, dest) 的**上转型**,
把下转型判为非法,导致 TransPyV 真实代码误报:
TransPyV/App/lib/core/Gen/Call/CallGenDispatch.vp:824
len_arg_node: ast.AST* = cargs.get(0)
self.Gen.CallGenProp._is_list_builtin_receiver(pool, len_val, len_cls_nm,
"__len__", len_arg_node)
形参声明 cl: rawptr[ast.Call](Call 派生自 AST)
→ 无法将"rawptr[AST]"类型的参数分配给函数"_is_list_builtin_receiver"中
类型为"rawptr[Call]"的参数"cl"
Viper 指针运行期不带静态类型(都是 i8*),同一继承体系内的 reinterpret
(含下转型)是既有代码的常规写法,编译器也接受,故改为**继承体系内双向**:
isDerivedFrom(src, dest) || isDerivedFrom(dest, src)(仍在 cloneAsInstantiable
之后比较)。不相关结构体(Node* → Other*)、结构体 ↔ 基本类型仍拒绝。
viperPointerConversion.test.ts 增至 3 用例:新增「AST*↔Call* 放行 + 不相关结构体
报 L28」,既有 2 用例断言([19] / [36,46,49])不变。jest 822 → 823。