Thread overview | |||||
---|---|---|---|---|---|
|
August 20, 2011 [Issue 6540] New: Default struct constructor problem | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=6540 Summary: Default struct constructor problem Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nobody@puremagic.com ReportedBy: bearophile_hugs@eml.cc --- Comment #0 from bearophile_hugs@eml.cc 2011-08-20 15:27:16 PDT --- I don't understand what's happening here, but I think there is something wrong: struct V3 { double[3] v; void foo() { auto v2 = v[] / 2; V3 r = V3(v2); // line 5 } } void main() {} DMD 2.055beta gives: test.d(5): Error: cannot implicitly convert expression (v2) of type double[] to double -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
February 09, 2013 [Issue 6540] Default struct constructor problem | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile_hugs@eml.cc | http://d.puremagic.com/issues/show_bug.cgi?id=6540 Andrej Mitrovic <andrej.mitrovich@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrej.mitrovich@gmail.com --- Comment #1 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2013-02-09 05:55:38 PST --- The error is now: Error: cannot implicitly convert expression (v2) of type double[] to double[3u] But this seems normal to me. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
February 09, 2013 [Issue 6540] Default struct constructor problem | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile_hugs@eml.cc | http://d.puremagic.com/issues/show_bug.cgi?id=6540 --- Comment #2 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2013-02-09 05:57:00 PST --- (In reply to comment #1) > The error is now: > > Error: cannot implicitly convert expression (v2) of type double[] to double[3u] > > But this seems normal to me. Edit: This is in git-head, forgot to mention. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation