digitalmars.D.bugs - [Issue 8677] New: compiler attempts to call ctor instead of opCall
- d-bugmail puremagic.com (34/34) Sep 17 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8677
- d-bugmail puremagic.com (10/10) Sep 17 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8677
- d-bugmail puremagic.com (12/12) Sep 17 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8677
http://d.puremagic.com/issues/show_bug.cgi?id=8677 Summary: compiler attempts to call ctor instead of opCall Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: andrej.mitrovich gmail.com --- Comment #0 from Andrej Mitrovic <andrej.mitrovich gmail.com> 2012-09-17 07:31:40 PDT --- struct Foo { this(int) {} bool opCall(string) { return true; } } void main() { Foo foo = Foo(1); if (foo("a")) { } // error } test.d(17): Error: constructor test.Foo.this (int _param_0) is not callable using argument types (string) test.d(17): Error: cannot implicitly convert expression ("a") of type string to int The compiler has no business calling a ctor on a variable invocation. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Sep 17 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8677 bearophile_hugs eml.cc changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bearophile_hugs eml.cc --- Comment #1 from bearophile_hugs eml.cc 2012-09-17 09:40:48 PDT --- Probably this is a dupe. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Sep 17 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8677 Andrej Mitrovic <andrej.mitrovich gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |DUPLICATE --- Comment #2 from Andrej Mitrovic <andrej.mitrovich gmail.com> 2012-09-17 10:49:43 PDT --- Yep, almost exact dup of http://d.puremagic.com/issues/show_bug.cgi?id=7210#c1 *** This issue has been marked as a duplicate of issue 7210 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Sep 17 2012