[Issue 5223] [qtd] Cannot use default value with function parameter of struct type
https://issues.dlang.org/show_bug.cgi?id=5223 Kenji Hara changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |DUPLICATE --- Comment #4 from Kenji Hara --- *** This issue has been marked as a duplicate of issue 6766 *** --
[Issue 5223] [qtd] Cannot use default value with function parameter of struct type
http://d.puremagic.com/issues/show_bug.cgi?id=5223 Andrej Mitrovic changed: What|Removed |Added Platform|Other |All See Also||http://d.puremagic.com/issu ||es/show_bug.cgi?id=6766 OS/Version|Linux |All --- Comment #3 from Andrej Mitrovic 2013-02-10 09:05:19 PST --- Also same problem for classes: http://d.puremagic.com/issues/show_bug.cgi?id=6766 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5223] [qtd] Cannot use default value with function parameter of struct type
http://d.puremagic.com/issues/show_bug.cgi?id=5223 Andrej Mitrovic changed: What|Removed |Added CC||andrej.mitrov...@gmail.com --- Comment #2 from Andrej Mitrovic 2012-12-18 12:44:39 PST --- (In reply to comment #1) > Even simpler test-case: This is very similar to Issue 3206. I think what's probably happening is that the semantic analysis on the call expression in a default argument is done without completing the semantic analysis on the struct/class first. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5223] [qtd] Cannot use default value with function parameter of struct type
http://d.puremagic.com/issues/show_bug.cgi?id=5223 --- Comment #1 from Max Samukha 2010-11-16 09:48:10 PST --- Even simpler test-case: struct S { this(int x) { } void foo(S s = S(42)) { } } void main() { S s; s.foo(); // error } Error: more initializers than fields of S -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---