Bug 10957 – Bad diagnostic: compiler attempts to do UFCS on a non-function

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-09-03T13:37:01Z
Last change time
2024-12-13T18:11:10Z
Keywords
diagnostic
Assigned to
No Owner
Creator
Andrej Mitrovic
Moved to GitHub: dmd#18664 →

Comments

Comment #0 by andrej.mitrovich — 2013-09-03T13:37:01Z
----- 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);
Comment #1 by b2.temp — 2023-10-16T08:57:46Z
*** Issue 20499 has been marked as a duplicate of this issue. ***
Comment #2 by robert.schadek — 2024-12-13T18:11:10Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18664 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB