[Issue 23576] Better Error Message When Forgetting To Pass A Template Parameter
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Dec 24 00:00:16 UTC 2022
https://issues.dlang.org/show_bug.cgi?id=23576
Salih Dincer <salihdb at hotmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |salihdb at hotmail.com
--- Comment #1 from Salih Dincer <salihdb at hotmail.com> ---
You are right, previous version error:
Issue23576.d(22): Error: template `source.test3` cannot deduce function from
argument types `!()(byte)`, candidates are:
Issue23576.d(8): `source.test3(E)(int d)`
Same codes:
void test2(C)(C d)
{
byte x = 42;
assert(d == x);
assert(is(typeof(x) : C));
}
template test3(E)
{
void test3(E d)
{
byte x = 42;
assert(d == x);
assert(is(typeof(x) : E));
}
}
void main()
{
byte a = 42;
test2(a);
test3(a);
}
--
More information about the Digitalmars-d-bugs
mailing list