← Back to index
|
Original Bugzilla link
Bug 9888 – Allow passing a generator to std.random.uniform for enums
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-04-05T17:06:00Z
Last change time
2013-04-13T06:55:33Z
Keywords
pull
Assigned to
nobody
Creator
nilsbossung
Comments
Comment #0
by nilsbossung — 2013-04-05T17:06:53Z
--- cat > test.d <<code import std.random; enum E {a} void main() { auto r = Random(0); assert(r.uniform!E() == E.a); } code dmd test.d ./test --- core.exception.AssertError@test(6): Assertion failure --- (backtrace omitted) Pull request is on the way.
Comment #1
by nilsbossung — 2013-04-05T17:12:08Z
https://github.com/D-Programming-Language/phobos/pull/1247
Comment #2
by github-bugzilla — 2013-04-13T06:53:55Z
Commit pushed to master at
https://github.com/D-Programming-Language/phobos
https://github.com/D-Programming-Language/phobos/commit/0cf38786a7512565be6521f4bcb7eda1100e91de
Merge pull request #1247 from NilsBossung/uniform_enum fix Issue 9888 - std.random.uniform!enum(generator) fails