[Issue 12357] Untyped string variable fails silently. No compiler warning given.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Mar 13 07:14:09 PDT 2014


https://d.puremagic.com/issues/show_bug.cgi?id=12357


Adam D. Ruppe <destructionator at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |destructionator at gmail.com


--- Comment #2 from Adam D. Ruppe <destructionator at gmail.com> 2014-03-13 07:14:08 PDT ---
I'm not sure it all is to blame on the whole property thing...

1) The text function in the "setter" call returned a value that was unused. I
think text in this case is a pure function, so that's a noop and potentially
could be an error for that reason.

2) In the second case, it calls text with zero arguments, which i don't think
ever makes sense. Perhaps we could change the signature to add an if(T.length)
constraint to text.



But yeah, the reason this is allowed at all is the loose property setter and
optional parens features rather than a compiler bug.

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


More information about the Digitalmars-d-bugs mailing list