Permalink
Browse files

Merge pull request #1577 from 9rnsr/fix9420

Issue 9420 - [2.062alpha] Weird "(null)" output in error message
  • Loading branch information...
yebblies committed Jan 29, 2013
2 parents c1a0bfe + 4c25eb2 commit e2aa18cbeff57e94fba284811189f63999636099
Showing with 23 additions and 0 deletions.
  1. +1 −0 src/mtype.c
  2. +22 −0 test/fail_compilation/diag9420.d
View
@@ -1639,6 +1639,7 @@ char *Type::modToChars()
{
OutBuffer buf;
modToBuffer(&buf);
+ buf.writebyte(0);
return buf.extractData();
}
@@ -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 e2aa18c

Please sign in to comment.