Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core: Make OpResult and BlockArgument generic like SSAValue #3989

Open
wants to merge 1 commit into
base: math-fehr/stack/3
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions xdsl/ir/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
Loading