Permalink
Browse files

Fixes Issue 6707

  • Loading branch information...
1 parent 77ad29c commit d123b58057a8116d3549418551ed7ea03f9c46cd @AndrejMitrovic AndrejMitrovic committed Oct 4, 2012
Showing with 23 additions and 7 deletions.
  1. +4 −7 src/func.c
  2. +19 −0 test/fail_compilation/diag6707.d
View
@@ -2450,17 +2450,14 @@ if (arguments)
OutBuffer buf;
buf.writeByte('(');
- if (arguments)
+ if (arguments && arguments->dim)
{
HdrGenState hgs;
-
argExpTypesToCBuffer(&buf, arguments, &hgs);
- buf.writeByte(')');
- if (ethis)
- ethis->type->modToBuffer(&buf);
}
- else
- buf.writeByte(')');
+ buf.writeByte(')');
+ if (ethis)
+ ethis->type->modToBuffer(&buf);
if (m.last == MATCHnomatch)
{
@@ -0,0 +1,19 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/diag6707.d(9): Error: function diag6707.Foo.value () is not callable using argument types () const
+---
+*/
+
+#line 1
+module diag6707;
+
+struct Foo
+{
+ @property bool value() { return true; }
+
+ void test() const
+ {
+ auto x = value;
+ }
+}

0 comments on commit d123b58

Please sign in to comment.