Bug 4350 – (mixin) mixed in template identifier is not accessible by "with" statement
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2010-06-19T13:32:00Z
Last change time
2016-01-03T14:02:18Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
michal.minich
Comments
Comment #0 by michal.minich — 2010-06-19T13:32:14Z
dmd 2.047
template Bar () { int bar; }
struct Foo {
int foo;
mixin Bar mix;
}
void main () {
Foo f;
f.foo = 1;
f.mix.bar = 1;
with (f) {
foo = 2;
mix.bar = 2; // Error: type Foo is not an expression
}
}
Comment #1 by lt.infiltrator — 2015-10-31T14:31:22Z