Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
jorendumoulin committed Dec 9, 2024
1 parent 8adbdc4 commit 4b85b10
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/dialects/test_builtin.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,16 @@ def test_IntegerType_formats():
assert IntegerType(32).format == "<i"
assert IntegerType(64).format == "<q"


def test_IndexType_formats():
assert IndexType().format == "<q"


def test_IndexType_bitwidth():
with pytest.raises(RuntimeError):
IndexType().bitwidth


def test_FloatType_packing():
nums = (-128, -1, 0, 1, 127)
buffer = f32.pack(nums)
Expand Down
1 change: 1 addition & 0 deletions xdsl/dialects/builtin.py
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,7 @@ def format(self) -> str:
def bitwidth(self) -> int:
raise RuntimeError("IndexType bitwidth not known at compile-time")


IndexTypeConstr = BaseAttr(IndexType)

_IntegerAttrType = TypeVar(
Expand Down

0 comments on commit 4b85b10

Please sign in to comment.