Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Merged
merged 1 commit into from

2 participants

@yebblies yebblies merged commit e2aa18c into D-Programming-Language:master
@ghost Unknown referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@ghost Unknown referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@ghost Unknown referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@ghost Unknown referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
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);
+}
Something went wrong with that request. Please try again.