http://d.puremagic.com/issues/show_bug.cgi?id=9078
Summary: non-static opCall is chosen instead of a default constructor Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: void.unsig...@gmail.com --- Comment #0 from void.unsig...@gmail.com 2012-11-25 10:26:49 PST --- [From the thread at: http://forum.dlang.org/thread/sntkmtabuhuctcbnl...@forum.dlang.org] The following code: struct A { int i; void opCall(int i) { } } void main() { auto a = A(42); } fails to compile with errors: Error: variable deneme.main.a type void is inferred from initializer opCall(42), and variables cannot be of type void Error: expression opCall(42) is void and has no value A non-static opCall is chosen instead of a default constructor. The non-static opCall() overloads should not interfere with construction. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------