D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 19687 - Wrong error for overloaded opDispatch + UFCS with non-existing function
Summary: Wrong error for overloaded opDispatch + UFCS with non-existing function
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P5 minor
Assignee: No Owner
URL:
Keywords: diagnostic, pull
Depends on:
Blocks:
 
Reported: 2019-02-19 15:08 UTC by Vladimir Panteleev
Modified: 2019-02-24 18:25 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Vladimir Panteleev 2019-02-19 15:08:09 UTC
///////////////////// test.d /////////////////////
struct S
{
    void opDispatch(string name)() {}
    void opDispatch(string name)(string value) { }
}

unittest
{
    S n;
    n.foo = "".nonexisting();
}
//////////////////////////////////////////////////

Compiler output:

test.d(10): Error: no property foo for type S

Looks like a regression in 2.064, before which the error message correctly mentioned "nonexisting".
Comment 1 Dlang Bot 2019-02-20 15:57:36 UTC
@RazvanN7 created dlang/dmd pull request #9378 "Fix Issue 19687 - Wrong error for overloaded opDispatch + UFCS with non-existing function" fixing this issue:

- Fix Issue 19687 - Wrong error for overloaded opDispatch + UFCS with non-existing function

https://github.com/dlang/dmd/pull/9378
Comment 2 Dlang Bot 2019-02-21 10:13:13 UTC
dlang/dmd pull request #9378 "Fix Issue 19687 - Wrong error for overloaded opDispatch + UFCS with non-existing function" was merged into stable:

- e12ede8ff8386c429356295dfa23682cadd44dc5 by RazvanN7:
  Fix Issue 19687 - Wrong error for overloaded opDispatch + UFCS with non-existing function

https://github.com/dlang/dmd/pull/9378
Comment 3 Dlang Bot 2019-02-24 18:25:56 UTC
dlang/dmd pull request #9387 "Merge remote-tracking branch 'upstream/stable' into merge_stable" was merged into master:

- e12ede8ff8386c429356295dfa23682cadd44dc5 by RazvanN7:
  Fix Issue 19687 - Wrong error for overloaded opDispatch + UFCS with non-existing function

- 42a7874c9eefbae4c8dc3ba922a80f27769333a2 by The Dlang Bot:
  Merge pull request #9378 from RazvanN7/Issue_19687
  
  Fix Issue 19687 - Wrong error for overloaded opDispatch + UFCS with non-existing function
  merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>

https://github.com/dlang/dmd/pull/9387