import t import ast # ============================================================ # Regression test: __slots__ with ast.AST field types. # An unrecognized type annotation must error out instead of crashing in # VoidType alloca; ast.expr (invalid) errors, ast.AST (valid) compiles. # ============================================================ class Result: __slots__ = ('elem_type_node', 'count_node', 'is_pointer') def __init__(self, elem: ast.AST, count: ast.AST*, flag: bool) -> None: self.elem_type_node: ast.AST = elem self.count_node: ast.AST* = count self.is_pointer: bool = flag def main() -> int: return 0