Skip to content
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

Implicit Conversion of Template Instantiations #16314

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

WalterBright
Copy link
Member

DIP proposal:

https://github.com/WalterBright/documents/blob/master/templatecast.md

Doesn't implement covariance of non-static member functions yet.

Will be talking about it at DConf:

https://dconf.org/2024/online/index.html#walterb

@dlang-bot
Copy link
Contributor

Thanks for your pull request, @WalterBright!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + dmd#16314"

@WalterBright WalterBright force-pushed the imptmpcnv branch 2 times, most recently from fd929f3 to 7036818 Compare March 16, 2024 05:24
@WalterBright
Copy link
Member Author

Looks like I was wrong that nobody would be relying on this behavior:

std\typecons.d(333): Error: static assert:  `!__traits(compiles, delegate () nothrow @system
{
Unique!(Object) uo = cast(Unique!(Object))uc;
uo.~this();
}
)` is false

and, in vibe.d:

../../../.dub/packages/vibe-inet/1.0.0/vibe-inet/source/vibe/inet/url.d(99,7): Error: `vibe.inet.url.URL.__ctor` called with argument types `(string, typeof(null), int, GenericPath!(InetPathFormat))` matches both:
--
  | ../../../.dub/packages/vibe-inet/1.0.0/vibe-inet/source/vibe/inet/url.d(84,2):     `vibe.inet.url.URL.this(string schema, string host, ushort port, GenericPath!(InetPathFormat) path)`
  | and:
  | ../../../.dub/packages/vibe-inet/1.0.0/vibe-inet/source/vibe/inet/url.d(120,2):     `vibe.inet.url.URL.this(string schema, string host, ushort port, GenericPath!(WindowsPathFormat) path)`

@thewilsonator thewilsonator added Needs Changelog A changelog entry needs to be added to /changelog Needs Spec PR A PR updating the language specification needs to be submitted to dlang.org Needs Approval labels Mar 16, 2024
@WalterBright
Copy link
Member Author

Blocked by dlang/phobos#8950

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Needs Approval Needs Changelog A changelog entry needs to be added to /changelog Needs Spec PR A PR updating the language specification needs to be submitted to dlang.org
Projects
None yet
3 participants