Comment #0 by andrej.mitrovich — 2010-08-07T17:43:48Z
This should not compile (from TDPL):
import std.stdio;
class NoGo {
void fun() {
this = new NoGo;
}
}
void main() { }
unittest {
auto n = new NoGo;
n.fun();
}
There are no runtime errors.
Comment #2 by andrej.mitrovich — 2012-01-21T16:57:35Z
This also seems a dup of Issue 780, so that should be closed when that pull is merged.
Comment #3 by k.hara.pg — 2012-01-22T05:10:14Z
(In reply to comment #2)
> This also seems a dup of Issue 780, so that should be closed when that pull is
> merged.
Bug 780 is marked as D1 issue. And my patch contains some other fixes around assignment, so merging the changes into D1 branch will be difficult.
In other words, D1 branch will require another patch to fix the "rebinding this" problem.
So I think we should not close bug 780 by merging my patch into D2.
Comment #4 by github-bugzilla — 2012-10-07T10:27:24Z
Comment #6 by andrej.mitrovich — 2012-11-27T17:15:02Z
Note: http://d.puremagic.com/issues/show_bug.cgi?id=9079#c2
And Walter's comment: http://d.puremagic.com/issues/show_bug.cgi?id=780#c3
I'm not sure whether we should revert this or not. Those 4 steps Walter mentioned could have already been taken since this report was first made (even though he mentions it only this year).
Unfortunately this is what happens when development procedures are written in comments instead of a more visible place..
Comment #7 by andrej.mitrovich — 2012-11-27T17:16:24Z
(In reply to comment #6)
> Unfortunately this is what happens when development procedures are written in
> comments instead of a more visible place..
Actually things aren't *that* grim, because this only affects Git head. So the pull for this can be reverted without much problems methinks..
Comment #8 by mike — 2012-12-31T03:22:10Z
http://d.puremagic.com/issues/show_bug.cgi?id=780#c3 :
> Since code like gtkd relies on allowing it,
Since reverting this has come up a few times already, i'd like to note that GtkD no longer depends on reassigning this.