Files
Viper_RegressionTesting/DefaultArgTest/App/remote.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

22 lines
647 B
Plaintext

import t
# 跨模块:单个尾随默认值(对照 includes/json/__writer.vp 的 write 形态)
def one(x: int, cap: sizet = 4096) -> sizet:
return cap
# 跨模块:4 参、最后一个有默认值(与 json.write(pool, val, pretty, cap=4096) 同形)
def write(a: int, b: int, pretty: bool, cap: sizet = 4096) -> sizet:
return cap
# 跨模块:多个尾随默认值
def quad(a: int, b: int = 10, c: int = 20, d: int = 30) -> int:
return a + b * 100 + c * 10000 + d * 1000000
# 跨模块:乱序/命名传参(wiki 04-functions.md 的 add 形态)
def many(x: int, y: int, z: int = 1) -> int:
return (x + y) * z