-
-
Notifications
You must be signed in to change notification settings - Fork 352
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 bug in isSubtypeOf (broken contract X.isSubtypeOf(X)==true) #1157
Conversation
Thanks for the report. They should have the same behavior and x.isSubtypeOf(x)==true is correct. Do you fix it? |
May be I can fix it this evening. We will see if I will have time. |
… use method defined in CtTypeReferenceImpl.
bdaadb3
to
ceb93f5
Compare
I personally have nothing for this topic. I have not touched that problem/code/need yet. I suggest to discuss it in different PR/Issue, so this PR can be finished fast and I can fix other related problems in I commented the test for isSubTypeOf for TypeParameters, so this PR pass all other tests well and can be merged. |
Revapi Analysis resultsOld API: fr.inria.gforge.spoon:spoon-core:jar:5.6.0-20170131.234706-21 New API: fr.inria.gforge.spoon:spoon-core:jar:5.6.0-SNAPSHOT Detected changes: 0. |
Revapi Analysis resultsOld API: fr.inria.gforge.spoon:spoon-core:jar:5.6.0-20170131.234706-21 New API: fr.inria.gforge.spoon:spoon-core:jar:5.6.0-SNAPSHOT Detected changes: 0. |
Great, indeed it should be done in another PR. I open an issue. |
Revapi Analysis resultsOld API: fr.inria.gforge.spoon:spoon-core:jar:5.6.0-20170201.234549-22 New API: fr.inria.gforge.spoon:spoon-core:jar:5.6.0-SNAPSHOT Detected changes: 0. |
There are two implementations of
CtTypeInformation#isSubtypeOf(CtTypeReference)
, which has following comment:and two implementations:
CtTypeReferenceImpl#isSubtypeOf
CtTypeImpl#isSubtypeOf
There is bug that each implementation behaves different. See the failing test of this PR.
Which behavior is correct? I personally thought that x.isSubtypeOf(x)==true is correct. But I have seen code which expected opposite...
Should we fix it? How?