Bug 20034 – [Reg 2.087.0] hashOf of a non-scalar enum doesn't compile

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
All
OS
All
Creation time
2019-07-08T10:32:05Z
Last change time
2019-07-25T11:40:51Z
Assigned to
No Owner
Creator
Radu Racariu

Comments

Comment #0 by radu.racariu — 2019-07-08T10:32:05Z
The following: ``` import std.stdio; enum Algo { a = "foo", b = "bar", c = "baz" } void main() { writeln(hashOf(Algo.a, 1)); } ``` Produces an error: /dlang/dmd/linux/bin64/../../src/druntime/import/core/internal/hash.d(135): Error: undefined identifier e_val, did you mean variable val? onlineapp.d(14): Error: template instance `core.internal.hash.hashOf!(Algo)` error instantiating
Comment #1 by radu.racariu — 2019-07-08T12:26:43Z