-
Notifications
You must be signed in to change notification settings - Fork 274
Add test for casting after a clean or soft cast #4201
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
Add test for casting after a clean or soft cast #4201
Conversation
@@ -0,0 +1,21 @@ | |||
|
|||
public class base<T> { } |
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.
Please capitalize class identifiers
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.
base.class (Base.class) file doesn't seem to be committed ?
5136721
to
f6bbc9a
Compare
An upcast can be implemented by &child->base rather than using a typecast_exprt, but in the case of a specialised generic we may still need a cast. Check that a cast is produced when expected.
f6bbc9a
to
265b96b
Compare
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.
🚫
This PR failed Diffblue compatibility checks (cbmc commit: 5136721).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/101129063
Status will be re-evaluated on next push.
Please contact @peterschrammel, @thk123, or @allredj for support.
Common spurious failures:
- the cbmc commit has disappeared in the mean time (e.g. in a force-push)
- the author is not in the list of contributors (e.g. first-time contributors).
The incompatibility may have been introduced by an earlier PR. In that case merging this
PR should be avoided unless it fixes the current incompatibility.
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.
✔️
Passed Diffblue compatibility checks (cbmc commit: 265b96b).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/101131620
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.
🚫
This PR failed Diffblue compatibility checks (cbmc commit: f6bbc9a).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/101130945
Status will be re-evaluated on next push.
Please contact @peterschrammel, @thk123, or @allredj for support.
Common spurious failures:
- the cbmc commit has disappeared in the mean time (e.g. in a force-push)
- the author is not in the list of contributors (e.g. first-time contributors).
The incompatibility may have been introduced by an earlier PR. In that case merging this
PR should be avoided unless it fixes the current incompatibility.
This is a test for 0a3b99b, one of the type consistency fixes committed with #3822
These will get easier to express as and when
expr2java
prints generic type parameters / qualifiers, but I won't take that task on here, particularly because that means checking all consumers of pretty-printed output.