Files
Viper_RegressionTesting/IsinstanceTest/App/geom_lib.vp
T
TermiNexus ee6461be46 chore(comments): Test 仓注释英文化(R11)
把 81 个 .vp 文件的中文 # 注释与三引号文档串改写为简洁英文,每个连续注释块 <=2 行;运行时中文字符串字面量(testcheck.begin/print 等用户可见消息)保持原样。骨架比对 HEAD 与工作区 112 文件漂移 0,全量 77/77 顺序回归通过。
2026-10-05 22:43:38 +08:00

42 lines
718 B
Plaintext

import t
from t import CInt
# ============================================================
# Cross-module isinstance test library: classes defined here are imported by
# main.vp to verify vtable comparison resolves across object files.
# ============================================================
@t.CVTable
class Shape:
def area(self) -> CInt:
return 0
@t.CVTable
class Circle(Shape):
r: CInt
def __init__(self, r: CInt):
self.r = r
def area(self) -> CInt:
return self.r
@t.CVTable
class Square(Shape):
s: CInt
def __init__(self, s: CInt):
self.s = s
def area(self) -> CInt:
return self.s
@t.NoVTable
class PlainShape:
tag: CInt