D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 6711 - "with" doesn't work with "alias this"
Summary: "with" doesn't work with "alias this"
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 normal
Assignee: No Owner
URL:
Keywords: pull, rejects-valid
: 5887 7609 (view as issue list)
Depends on:
Blocks:
 
Reported: 2011-09-22 00:31 UTC by Vladimir Panteleev
Modified: 2013-07-26 10:34 UTC (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Vladimir Panteleev 2011-09-22 00:31:00 UTC
struct A { int i; }
struct B { A a; alias a this; }

B b;
static assert(is(typeof({
	with (b)
		i=0;
})));
Comment 1 Andrej Mitrovic 2011-09-24 16:58:16 UTC
*** Issue 5887 has been marked as a duplicate of this issue. ***
Comment 2 Andrej Mitrovic 2011-09-24 16:58:50 UTC
(In reply to comment #1)
> *** Issue 5887 has been marked as a duplicate of this issue. ***

Marked older as dup since you have a simpler test-case.
Comment 3 Andrej Mitrovic 2013-02-08 15:35:49 UTC
*** Issue 7609 has been marked as a duplicate of this issue. ***
Comment 4 Andrej Mitrovic 2013-06-09 12:01:54 UTC
*** Issue 9807 has been marked as a duplicate of this issue. ***
Comment 6 github-bugzilla 2013-07-25 20:02:59 UTC
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/771b1ac53e94016e23483f99ce172cb464cf6594
fix issue 6711 - "with" doesn't work with "alias this"

https://github.com/D-Programming-Language/dmd/commit/dfc7624ccb106b775bbd8df3120bc128ad46fd79
Merge pull request #2380 from hpohl/6711

fix issue 6711 - "with" doesn't work with "alias this"
Comment 7 Andrej Mitrovic 2013-07-26 03:05:17 UTC
The test-case in Issue 9807 still doesn't work, so I've reopened this.