Constructor params with same name as members
Shriramana Sharma via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed Oct 22 22:31:10 PDT 2014
Hello. I perfectly realize that it's not advisable to take advantage
of shadowing. In fact, I asked the question because I thought D
specifically *didn't* allow shadowing, but here it is, being silently
permitted to mishappen... I seem to read to have read that (D didn't
allow shadowing) but I'm not able to point to where...
BTW I compiled it with LDC 0.14.0 and separately with D 2.066.0 and
both give the same result.
So shouldn't the compiler ideally complain about the arguments
shadowing members?
--
Shriramana Sharma ஶ்ரீரமணஶர்மா श्रीरमणशर्मा
More information about the Digitalmars-d-learn
mailing list