Bug 11746 – invalid enum forward reference pattern not detected

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-12-14T14:25:00Z
Last change time
2017-07-19T17:39:03Z
Keywords
accepts-invalid, pull
Assigned to
nobody
Creator
timon.gehr

Comments

Comment #0 by timon.gehr — 2013-12-14T14:25:39Z
DMD 2.064.2 accepts the following invalid code: string bb(int x, string y){ return "3"; } enum E { foo = bb(cast(int)bar, cast(string)baz), bar=1, baz="2" } (Note that E.bar is assigned type 'int'.)
Comment #1 by k.hara.pg — 2015-02-23T14:39:42Z
Comment #2 by github-bugzilla — 2015-02-27T06:35:08Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/1b419fb6972bdf30e71d35f0a93aac900e11e1dd fix Issue 11746 - invalid enum forward reference pattern not detected https://github.com/D-Programming-Language/dmd/commit/e6e194a2be6be97b23df4bfa397d70a34c5d8177 Merge pull request #4440 from 9rnsr/fix11746 Issue 11746 - invalid enum forward reference pattern not detected
Comment #3 by github-bugzilla — 2015-06-17T21:01:20Z
Comment #4 by github-bugzilla — 2017-07-19T17:39:03Z
Commits pushed to dmd-cxx at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/1b419fb6972bdf30e71d35f0a93aac900e11e1dd fix Issue 11746 - invalid enum forward reference pattern not detected https://github.com/dlang/dmd/commit/e6e194a2be6be97b23df4bfa397d70a34c5d8177 Merge pull request #4440 from 9rnsr/fix11746