Skip to content

Commit

Permalink
fix Issue 9420 - [2.062alpha] Weird "(null)" output in error message
Browse files Browse the repository at this point in the history
  • Loading branch information
9rnsr committed Jan 29, 2013
1 parent d37a401 commit 4c25eb2
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/mtype.c
Expand Up @@ -1639,6 +1639,7 @@ char *Type::modToChars()
{
OutBuffer buf;
modToBuffer(&buf);
buf.writebyte(0);
return buf.extractData();
}

Expand Down
22 changes: 22 additions & 0 deletions test/fail_compilation/diag9420.d
@@ -0,0 +1,22 @@
/*
TEST_OUTPUT
---
fail_compilation/diag9420.d(21): Error: function diag9420.S.t3!().tx () is not callable using argument types (int)
fail_compilation/diag9420.d(21): Error: expected 0 arguments, not 1 for non-variadic function type pure nothrow @safe void()
---
*/

mixin template Mixin() { }
struct S
{
template t3(T...)
{
void tx(T){}
alias t3 = tx;
}
}
void main()
{
S s1;
s1.t3!()(1);
}

0 comments on commit 4c25eb2

Please sign in to comment.