-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Make messages mandatory in errors #15671
base: develop
Are you sure you want to change the base?
Conversation
This pull request is stale because it has been open for 14 days with no activity. |
else if (dynamic_cast<IntegerType const*>(&_to)) | ||
{ | ||
solUnimplementedAssert(fromCategory != Type::Category::FixedPoint); | ||
solUnimplementedAssert(fromCategory != Type::Category::FixedPoint, "Fixed point types not implemented."); |
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 add a semantic test for this (or any other assert)? The legacy codegen one has a different error message, which is not ideal, but at this point I don't think it makes sense to invest the time in updating them.
This pull request is stale because it has been open for 14 days with no activity. |
This pull request is stale because it has been open for 14 days with no activity. |
This pull request is stale because it has been open for 14 days with no activity. |
Errors shown to the user should always have a message. One situation where it is not always the case now are unimplemented feature errors. Those used to be treated as asserts but often they can actually reach the user. This PR deals with them by either converting to asserts or adding a message. Then makes the message mandatory in
solUnimplemented()
/solUnimplementedAssert()
and in the error reporter.This partially addresses cases like #15669, which currently get properly reported but in a very confusing way.
I could probably convert many more of these to asserts but in cases where I wasn't sure I decided to err on the side of keeping them as is.