Rename convert to convert_with_precedence#916
Merged
kroening merged 1 commit intodiffblue:masterfrom May 15, 2017
Merged
Conversation
tautschnig
requested changes
May 13, 2017
Collaborator
tautschnig
left a comment
There was a problem hiding this comment.
Looks good to me, except for the line breaks.
src/ansi-c/expr2c_class.h
Outdated
Collaborator
There was a problem hiding this comment.
Please add a line break instead of silencing the linter.
src/cpp/expr2cpp.cpp
Outdated
src/java_bytecode/expr2java.h
Outdated
94a673a to
cf19251
Compare
It is bad style to have an interface method the same name as an internal method with a different signature. Then on overriding one of these methods the compiler only finds the overloaded one with the wrong signature, doesn't look up the base class and fails. We fix this problem by renaming the protected method. This simplifies the code in all derived classes.
cf19251 to
351e3a7
Compare
owen-mc-diffblue
pushed a commit
to owen-mc-diffblue/cbmc
that referenced
this pull request
May 18, 2017
Now that PR diffblue#916 has been merged, we don't need to manually forward convert(const exprt) and convert(const typet) calls to the base class.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It is bad style to have an interface method the same name as an
internal method with a different signature. Then on overriding one of
these methods the compiler only finds the overloaded one with the wrong
signature, doesn't look up the base class and fails.
We fix this problem by renaming the protected method. This simplifies
the code in all derived classes.
This is an improvement on #888 , as suggested by @peterschrammel .