Bug 9420 – [2.062alpha] Weird "(null)" output in error message
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-01-28T23:08:00Z
Last change time
2013-01-29T03:49:31Z
Keywords
diagnostic, pull
Assigned to
nobody
Creator
k.hara.pg
Comments
Comment #0 by k.hara.pg — 2013-01-28T23:08:16Z
This code prints weird error message.
code:
----
mixin template Mixin() { }
struct S
{
template t3(T...)
{
void tx(T){}
alias t3 = tx; // no fwdref error...
}
}
void main()
{
S s1;
s1.t3!()(1); // line 14
}
output:
----
test.d(14): Error: function test.S.t3!().tx ()(null) is not callable using argument types (int)
test.d(14): Error: expected 0 arguments, not 1 for non-variadic function type pure nothrow @safe void()
`test.S.t3!().tx ()(null)` is incorrect.
This is introduced by:
https://github.com/D-Programming-Language/dmd/commit/c210663497a46e6cb2b805332d7de69ada23480e