Trying to do alias template deduction myself.
Elfstone
elfstone at yeah.net
Fri Apr 7 05:59:30 UTC 2023
On Friday, 7 April 2023 at 05:39:52 UTC, Salih Dincer wrote:
> On Friday, 7 April 2023 at 04:55:16 UTC, Elfstone wrote:
>> I need help with this problem, friends!
>>
>> PR requires spec change:
>> https://github.com/dlang/dmd/discussions/15086
>
> I tried the test code in 2 different versions (one of them old)
> and didn't run into any issues. It compiled for me with no
> errors.
>
> SDB at 79
This shouldn't happen. What test code did you run?
D master should be able to compile this code, as it's part of D's
autotest.
```D
struct S(T) {}
alias A(T) = S!T;
static assert(is(A!int : S!T, T));
static assert(!is(A!int : A!T, T));
```
But with my PR this will not compile, because my PR is exactly
about resolving `is(A!int : A!T, T)` to be true, therefore it
can't pass the autotest.
I'm stuck in a circle: I need to get my PR to be reviewed, before
I can convince others to change the spec. But the spec is
preventing my PR from passing the autotest.
More information about the Digitalmars-d
mailing list