[Issue 20034] New: [Reg 2.087.0] hashOf of a non-scalar enum doesn't compile
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jul 8 10:32:05 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=20034
Issue ID: 20034
Summary: [Reg 2.087.0] hashOf of a non-scalar enum doesn't
compile
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: regression
Priority: P1
Component: druntime
Assignee: nobody at puremagic.com
Reporter: radu.racariu at gmail.com
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
--
More information about the Digitalmars-d-bugs
mailing list