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 wiring error #261

Merged
merged 3 commits into from
Aug 23, 2018
Merged

Fix wiring error #261

merged 3 commits into from
Aug 23, 2018

Conversation

rsetaluri
Copy link
Collaborator

Fixed error message for arrays with different lengths.

Fixed error message for arrays with different lengths.
Copy link
Collaborator

@leonardt leonardt left a comment

Choose a reason for hiding this comment

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

Can you update the expected test output in tests/test_type/test_type_errors.py

magma/array.py Outdated
@@ -84,7 +84,7 @@ def wire(i, o, debug_info):
return

if i.N != o.N:
report_wiring_error(f'Cannot wire {o.debug_name} (type={type(o)}, len={i.N}) to {i.debug_name} (type={type(i)}, len={o.N}) because the arrays do not have the same length', debug_info) # noqa
report_wiring_error(f'Cannot wire {o.debug_name} (type={o.T}, len={o.N}) to {i.debug_name} (type={i.T}, len={i.N}) because the arrays do not have the same length', debug_info) # noqa
Copy link
Collaborator

Choose a reason for hiding this comment

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

Good catch, I think perhaps it makes the most sense to return type(o) and type(i) instead of .T and .N since those will be both contained in the type string.

@rsetaluri
Copy link
Collaborator Author

Done.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 1038

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 70.622%

Totals Coverage Status
Change from base Build 1032: 0.0%
Covered Lines: 3351
Relevant Lines: 4745

💛 - Coveralls

Copy link
Collaborator

@leonardt leonardt left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

@leonardt leonardt merged commit 420b74e into master Aug 23, 2018
@leonardt leonardt deleted the fix-array-wiring-error branch August 23, 2018 23:24
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.

None yet

3 participants