Created attachment 564 [details] Example of assignment to this Assigning to 'this' is currently not documented anywhere. Still assigning to this, at least in constructors, works and is used by some code (gtkd, for example). I think assigning to this should either work in constructors as it does right now, but it then should be documented, or it should be disallowed. If it will stay implementation specific, that should still be noted in the docs. see also: http://d.puremagic.com/issues/show_bug.cgi?id=780 The assignment of 'this' is allowed
This doesn't look major.
I just thought if you'd disallow assignment to this completely as the poster in bug 780 suggests, you might want to discuss that in the newsgroup. As this is quite late for d2 I flagged it major. Also I think completely undocumented and undefined features being already used in production code (gtkd) is a bad thing. However, I hadn't seen the bugzilla fields explanation, sorry. I'll change the priority. Btw, what is most likely to happen in the end? 1: make current behavior part of specification 2: disallow assignment to this completely 3: leave this as implementation specific behavior
Assignment to this and super should not be allowed. The gtkd code can be fixed by making a 'factory' method to create a new object. However, this is not a trivial fix, and so having the compiler disallow the current code should be a long time in coming. In the meantime, I've updated the spec.
Commit pushed to https://github.com/D-Programming-Language/d-programming-language.org https://github.com/D-Programming-Language/d-programming-language.org/commit/83763c15e1ecd9fbf527fa1e9e979855cabc5a81 fix Issue 3787 - clarification: assigment to 'this'
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル