-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Fixes #25340 #25389
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
base: devel
Are you sure you want to change the base?
Fixes #25340 #25389
Conversation
ac20804 to
eece156
Compare
| # Check if the aliased types (last elements) have inheritance relationship | ||
| let aLast = roota.last | ||
| let fLast = rootf.last | ||
| if aLast.kind == tyObject and fLast.kind == tyObject and trIsOutParam notin flags: |
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.
There is no subtype relation between G[T] and G[S] just because there is one between T and S. This is not sound!
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.
As I understand it aLast and fLast are not T and S, but the implementations of G[T] and G[S], so the behavior seems to be correct? Also I tried to come up with an example that demonstrates the unsound behavior, but could not. Again, I'm not 100% sure, but I don't see the problem here.
|
Fixed isa relation for refs and ptrs too. |
The fix is mostly AI generated (sans tests), please review carefully.