Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad diagnostic: compiler attempts to do UFCS on a non-function #18664

Open
dlangBugzillaToGithub opened this issue Sep 3, 2013 · 1 comment

Comments

@dlangBugzillaToGithub
Copy link

Andrej Mitrovic (@AndrejMitrovic) reported this on 2013-09-03T13:37:01Z

Transferred from https://issues.dlang.org/show_bug.cgi?id=10957

CC List

  • basile-z

Description

-----
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);
@dlangBugzillaToGithub
Copy link
Author

b2.temp commented on 2023-10-16T08:57:46Z

*** Issue 20499 has been marked as a duplicate of this issue. ***

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant