Bug 20927 – GIT HEAD: dmd gets confused if a struct defines copy constructor, but the struct using it does not

Status
RESOLVED
Resolution
DUPLICATE
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2020-06-13T18:19:30Z
Last change time
2020-06-14T10:56:38Z
Assigned to
No Owner
Creator
Puneet Goel

Comments

Comment #0 by puneet — 2020-06-13T18:19:30Z
$ cat foo.d struct Foo { Bar bar; void frop(Foo foo) { frop(foo, 0); } void frop(Foo foo, int zoo) { } } struct Bar { this(ref Bar ) { } } $ ./dmd.master/linux/bin64/dmd foo.d foo.d(3): Error: none of the overloads of frop are callable using argument types (Foo, int), candidates are: foo.d(3): foo.Foo.frop(Foo foo) foo.d(4): foo.Foo.frop(Foo foo, int zoo)
Comment #1 by puneet — 2020-06-14T10:55:42Z
After reading comments on BUG 20876, I realized this one is a duplicate.
Comment #2 by puneet — 2020-06-14T10:56:38Z
*** This issue has been marked as a duplicate of issue 20876 ***