Thread overview
[Issue 23576] Better Error Message When Forgetting To Pass A Template Parameter
Dec 23, 2022
Jack Stouffer
Dec 24, 2022
Salih Dincer
Dec 27, 2022
Iain Buclaw
December 23, 2022
https://issues.dlang.org/show_bug.cgi?id=23576

Jack Stouffer <jack@jackstouffer.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |diagnostic

--
December 24, 2022
https://issues.dlang.org/show_bug.cgi?id=23576

Salih Dincer <salihdb@hotmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |salihdb@hotmail.com

--- Comment #1 from Salih Dincer <salihdb@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);
}

--
December 27, 2022
https://issues.dlang.org/show_bug.cgi?id=23576

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P4

--