Does `is` expression with template alias need fixing.
Elfstone
elfstone at yeah.net
Thu Mar 16 04:10:39 UTC 2023
On Wednesday, 15 March 2023 at 11:59:00 UTC, SHOO wrote:
> On Wednesday, 15 March 2023 at 06:47:38 UTC, Elfstone wrote:
>> ```D
>> writeln(is(Vec3!float == Vec3!S, S)); // false
>> ```
>
> I recently faced a similar problem.
>
> ```d
> import std;
> static assert(isInstanceOf!(Array, Array!char)); // true
> static assert(isInstanceOf!(Regex, Regex!char)); // false
> ```
The compiler should at least report it as an error: `is` cannot
handle template alias.
More information about the Digitalmars-d
mailing list