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 printing struct name mismatch error #26

Merged
merged 1 commit into from
Feb 20, 2020

Conversation

kamilkowalski
Copy link
Contributor

Hammox uses the struct_name_type_mismatch error when it detects an incorrect struct being used compared to what was specified. As I understand, it is raised in two cases:

  • when a map is passed where a struct is expected,
  • when struct A is passed where struct B is expected.

The second case has an error associated, but there was no function formatting this error into a human-readable message.

This PR adds a missing test case and fixes the problem by formatting the message correctly.

Copy link
Owner

@msz msz left a comment

Choose a reason for hiding this comment

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

Good catch. Thanks for your work!

@msz msz merged commit 6078576 into msz:master Feb 20, 2020
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.

2 participants