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

fix: Fix printing of generic function parameters #516

Merged
merged 2 commits into from
Oct 1, 2024

Conversation

mark-koch
Copy link
Collaborator

Fixes #482

@mark-koch mark-koch requested a review from croyzor October 1, 2024 10:30
@mark-koch mark-koch requested a review from a team as a code owner October 1, 2024 10:30
def to_bound(self, idx: int | None = None) -> Argument:
def to_bound(self, idx: int | None = None) -> TypeArg:
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drive by: Use a more precise return type which is used in the test below

GuppyTypeError: Cannot instantiate non-linear type variable `T` in type `forall n, T: nat. array[T, n] -> int` with linear type `qubit`
GuppyTypeError: Cannot instantiate non-linear type variable `T` in type `forall T, n: nat. array[T, n] -> int` with linear type `qubit`
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was actually wrong in the golden error and no one noticed 😅

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🫠

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.58%. Comparing base (dd669c1) to head (aa68b93).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #516   +/-   ##
=======================================
  Coverage   91.58%   91.58%           
=======================================
  Files          59       59           
  Lines        6170     6170           
=======================================
  Hits         5651     5651           
  Misses        519      519           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mark-koch mark-koch added this pull request to the merge queue Oct 1, 2024
Merged via the queue into main with commit 5c18ef6 Oct 1, 2024
3 checks passed
@mark-koch mark-koch deleted the fix/func-param-printing branch October 1, 2024 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: Printing functions with multiple parameters is wrong
3 participants