Fix #20994 - Initialization of a struct-typed template parameter from…#22921
Fix #20994 - Initialization of a struct-typed template parameter from…#22921dkorpel wants to merge 1 commit intodlang:masterfrom
Conversation
… from a different type fails Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Thanks for your pull request and interest in making D better, @dkorpel! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.
|
|
Bunch of build kite failures |
|
All from unit-threaded |
|
I think I need to gag the errors raised by initializer semantic during speculative template instantiation |
|
This is weird, looks like also before this PR, default values are evaluated and error checked even if the template constraint fails: int gen(T)(T a) if (true) => 1;
int gen(T, T min = ERR)(T a) if (false) => 2;
enum x = gen(3);Results in: While I would expect the second overload to only be speculatively instantiated. |
… a different type fails