http://d.puremagic.com/issues/show_bug.cgi?id=10957
Summary: Bad diagnostic: compiler attempts to do UFCS on a
non-function
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Keywords: diagnostic
Severity: normal
Priority: P2
Component: DMD
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Andrej Mitrovic <[email protected]> 2013-09-03
13:37:01 PDT ---
-----
enum string value = "foo";
struct A
{
void test(A a)
{
auto x = a.value;
}
}
void main() { }
-----
$ dmd test.d
Error: function expected before (), not "foo" of type string
It looks like the compiler attempted to do UFCS on a non-function. The above
message is reproduced with:
auto x = value(a);
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------