修复了大量存在的问题,增加了假鸭子类型等等机制

This commit is contained in:
2026-06-25 14:49:46 +08:00
parent 19f2787db0
commit d88d11b646
827 changed files with 32617 additions and 18316 deletions

View File

@@ -0,0 +1,64 @@
"""
Auto-generated Python stub file from main.py
Module: main
"""
import c
import t
import stdio
import testcheck
def add[T](a: T, b: T) -> T: pass
def test_generic_add() -> t.CInt: pass
def combine[T1, T2](a: T1, b: T2) -> T1: pass
def test_generic_combine() -> t.CInt: pass
def max_val[T](a: T, b: T) -> T: pass
def test_generic_max() -> t.CInt: pass
class Box[T]:
value: T
def __init__(self: Box, v: T) -> t.CInt: pass
def get(self: Box) -> T: pass
def set(self: Box, v: T) -> t.CInt: pass
def test_generic_box() -> t.CInt: pass
class Pair[T1, T2]:
first: T1
second: T2
def __init__(self: Pair, a: T1, b: T2) -> t.CInt: pass
def sum_as_int(self: Pair) -> t.CInt: pass
def test_generic_pair() -> t.CInt: pass
def test_fixed_array() -> t.CInt: pass
def test_char_array() -> t.CInt: pass
def identity[T](x: T) -> T: pass
def test_generic_identity() -> t.CInt: pass
def double_val[T](x: T) -> T: pass
def test_generic_nested() -> t.CInt: pass
class Counter[T]:
count: T
def __init__(self: Counter, start: T) -> t.CInt: pass
def increment(self: Counter) -> t.CInt: pass
def get_count(self: Counter) -> T: pass
def test_generic_counter() -> t.CInt: pass
def main() -> t.CInt: pass