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

Remove the inaccurate Type::categoryName() #14143

Merged
merged 1 commit into from
Apr 23, 2023
Merged

Conversation

cameel
Copy link
Member

@cameel cameel commented Apr 20, 2023

This PR reverts most of my changes from #14087 and tweaks the error message in a different way, that does not require printing the type.

Discussion for reference: #12656 (comment), #12656 (comment).

The main problem with Type::categoryName() is that for most values it tries to describe the instance of the type, rather than the category - which fits the error message but is not a good formatter for that enum in general. I could fix it, but I actually found a better way to word it independently of its type (compared to #14087 (comment)), so I'll go with that instead.

…ge for invalid calls to one independent of the category
@cameel cameel self-assigned this Apr 20, 2023
Copy link
Member

@r0qs r0qs left a comment

Choose a reason for hiding this comment

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

Oh ok, yeah using expression sounds good enough to me.

libsolidity/ast/Types.cpp Show resolved Hide resolved
@ekpyron ekpyron merged commit cd5ae26 into develop Apr 23, 2023
@ekpyron ekpyron deleted the remove-type-categoryname branch April 23, 2023 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants