Skip to content

Commit

Permalink
chore: more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Jmgr committed Nov 27, 2024
1 parent f394956 commit 87a1965
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
9 changes: 4 additions & 5 deletions nada_dsl/nada_types/collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def store_in_ast(self, ty):
)


class TupleType(DslType):
class TupleType(NadaType):
"""Marker type for Tuples."""

is_compound = True
Expand Down Expand Up @@ -171,7 +171,7 @@ def _generate_accessor(ty: Any, accessor: Any) -> DslType:
return ty.instantiate(accessor)


class NTupleType(DslType):
class NTupleType(NadaType):
"""Marker type for NTuples."""

is_compound = True
Expand Down Expand Up @@ -261,7 +261,7 @@ def store_in_ast(self, ty: object):
)


class ObjectType(DslType):
class ObjectType(NadaType):
"""Marker type for Objects."""

is_compound = True
Expand Down Expand Up @@ -412,7 +412,7 @@ def store_in_ast(self, ty: DslTypeRepr):
)


class ArrayType(DslType):
class ArrayType(NadaType):
"""Marker type for arrays."""

is_compound = True
Expand Down Expand Up @@ -533,7 +533,6 @@ def inner_product(self: "Array[T]", other: "Array[T]") -> T:
if is_primitive_integer(self.contained_type) and is_primitive_integer(
other.contained_type
):

return self.contained_type.instantiate(
InnerProduct(left=self, right=other, source_ref=SourceRef.back_frame())
) # type: ignore
Expand Down
3 changes: 2 additions & 1 deletion test-programs/ntuple_accessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@ def add(acc: PublicInteger, a: PublicInteger) -> PublicInteger:

return [Output(final, "my_output", party1)]


if __name__ == "__main__":
nada_main()
nada_main()
1 change: 0 additions & 1 deletion test-programs/object_accessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ def nada_main():
array = object.b
scalar_2 = object.c


def add(acc: PublicInteger, a: PublicInteger) -> PublicInteger:
return acc + a

Expand Down

0 comments on commit 87a1965

Please sign in to comment.