Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix Issue 9420 - [2.062alpha] Weird "(null)" output in error message

  • Loading branch information...
commit 4c25eb2681642d482fe28b6b0eafe7fdf5a28e0b 1 parent d37a401
@9rnsr 9rnsr authored
Showing with 23 additions and 0 deletions.
  1. +1 −0  src/mtype.c
  2. +22 −0 test/fail_compilation/diag9420.d
View
1  src/mtype.c
@@ -1639,6 +1639,7 @@ char *Type::modToChars()
{
OutBuffer buf;
modToBuffer(&buf);
+ buf.writebyte(0);
return buf.extractData();
}
View
22 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);
+}
Please sign in to comment.
Something went wrong with that request. Please try again.