-
Notifications
You must be signed in to change notification settings - Fork 22
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
Fix wiring error #261
Conversation
Fixed error message for arrays with different lengths.
There was a problem hiding this 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 |
There was a problem hiding this comment.
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.
Done. |
Pull Request Test Coverage Report for Build 1038
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks!
Fixed error message for arrays with different lengths.