From 313016b75ddaba3ff89bcd656b2f82b700bb3ac6 Mon Sep 17 00:00:00 2001 From: Mathieu Fehr Date: Thu, 27 Feb 2025 19:00:33 +0000 Subject: [PATCH] core: Make OpResult and BlockArgument generic like SSAValue stack-info: PR: https://github.com/xdslproject/xdsl/pull/3989, branch: math-fehr/stack/4 --- xdsl/ir/core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xdsl/ir/core.py b/xdsl/ir/core.py index e344b6f466..e98602f42b 100644 --- a/xdsl/ir/core.py +++ b/xdsl/ir/core.py @@ -583,7 +583,7 @@ def __eq__(self, other: object) -> bool: @dataclass(eq=False) -class OpResult(SSAValue): +class OpResult(Generic[AttributeCovT], SSAValue[AttributeCovT]): """A reference to an SSA variable defined by an operation result.""" op: Operation @@ -601,7 +601,7 @@ def __repr__(self) -> str: @dataclass(eq=False) -class BlockArgument(SSAValue): +class BlockArgument(Generic[AttributeCovT], SSAValue[AttributeCovT]): """A reference to an SSA variable defined by a basic block argument.""" block: Block