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
Still exists in 2.068.
Comment #2 by k.hara.pg — 2015-11-02T15:01:03Z
Comment #3 by github-bugzilla — 2015-11-09T06:26:07Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/a7462333d2bdf7030c6d03c5668a3b9f27ca80a5 fix Issue 4350 - (mixin) mixed in template identifier is not accessible by "with" statement https://github.com/D-Programming-Language/dmd/commit/d08523d48a7547422832e147b01ab0319d9b901b Merge pull request #5252 from 9rnsr/fix4350 Issue 4350 - (mixin) mixed in template identifier is not accessible by "with" statement
Comment #4 by github-bugzilla — 2016-01-03T14:02:18Z
Commits pushed to stable at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/a7462333d2bdf7030c6d03c5668a3b9f27ca80a5 fix Issue 4350 - (mixin) mixed in template identifier is not accessible by "with" statement https://github.com/D-Programming-Language/dmd/commit/d08523d48a7547422832e147b01ab0319d9b901b Merge pull request #5252 from 9rnsr/fix4350