[Issue 20927] New: GIT HEAD: dmd gets confused if a struct defines copy constructor, but the struct using it does not
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Jun 13 18:19:30 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=20927
Issue ID: 20927
Summary: GIT HEAD: dmd gets confused if a struct defines copy
constructor, but the struct using it does not
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: regression
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: puneet at coverify.org
$ 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)
--
More information about the Digitalmars-d-bugs
mailing list