[Issue 11481] Clearly note all explicit casts are forwarded to `alias this` if there is no `opCast`

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Nov 9 06:39:44 PST 2013


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


timon.gehr at gmx.ch changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |timon.gehr at gmx.ch


--- Comment #1 from timon.gehr at gmx.ch 2013-11-09 06:39:42 PST ---
(In reply to comment #0)
> People tend to think explicit cast behaves as no-op if there is an implicit
> one. Documentation must clearly note it's wrong and `opCast` is tried to be
> called.
> 
> Also a list of operations rewritten as explicit cast like `if(someStruct)` must
> be provided as people tend to forget invisible explicit casts exist.
> 
> Appendix:
> * Filed invalid bugs because of this: Issue 3537, Issue 6777, Issue 7985, Issue
> 9151.

Issue 9151 is the only instance of this. Simply adding an alias this must not
result in hijacking, so the current behaviour is unacceptable for the other
issues.

> * Lockup mechanics explanation by Kenji Hara: Comment 2 of Issue 11161.

How exactly DMD derives unreasonable behaviour is not relevant for answering
the question whether the behaviour is reasonable.

-- 
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