[Issue 3438] constructor with defaulted parameters ignored

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Jan 22 16:16:39 PST 2012


http://d.puremagic.com/issues/show_bug.cgi?id=3438


Jonathan M Davis <jmdavisProg at gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jmdavisProg at gmx.com


--- Comment #3 from Jonathan M Davis <jmdavisProg at gmx.com> 2012-01-22 16:16:31 PST ---
At this point, I don't think that the situation with default constructors and
structs is going to change. It's a result of requiring init properties for all
types, and is thus a "forced fault" in the language. From discussions on it in
the newsgroup, it seems likely that if we were to create a restricted default
constructor (one which didn't do the things that we can't let it do, because it
woludn't work with init), it would too restrictive to really be of much use
anyway. So, I think that all of that strays from the point of this bug.

Having a default argument for all of the parameters of a struct's constructor
should result in a compilation error. It's illegal. The language doesn't
support it. But rather than giving an error, the compiler currently just
ignores it.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list