-
-
Notifications
You must be signed in to change notification settings - Fork 610
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 Issue 22351 - extern(C++) function contravariant in D, but not C++ #14169
Conversation
|
Thanks for your pull request, @ibuclaw! Bugzilla references
Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + dmd#14169" |
5134ecd to
6235eb6
Compare
|
Thanks, this looks good. The same problem also exists for parameters of functions. Here is a modified test case based on issue 22351: Of course I could put it in a different issue, so it is not needed for this pull request. |
|
@tim-dlang fix is in the same location, so can handle that here as well. |
a046608 to
b3e0e4a
Compare
|
Switched this from error -> deprecation. This is mostly to allow the buildkite/ldc pipeline to succeed, but also to warn any downstream projects of the ABI change over a graceful period. |
b548a7e to
2618f1b
Compare
|
The following example could be a false positive for the deprecation: The program currently prints 1 and 3, so B.f only overrides the overload A.f with const. DMD will now show the deprecation for B.f, but I think this example should still work. |
|
@tim-dlang moved the deprecation out of the for loop, so it looks at the best match only, instead of every possible match. |
Also fixes Issue 23135 - Covariance rules for C++ member functions mismatch D.
The special casing of mutable->const overrides in dtoh has been removed as with this change to the covariance rules for
extern(C++), such a mismatch should never occur anymore.