D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 20034 - [Reg 2.087.0] hashOf of a non-scalar enum doesn't compile
Summary: [Reg 2.087.0] hashOf of a non-scalar enum doesn't compile
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: druntime (show other issues)
Version: D2
Hardware: All All
: P1 regression
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-08 10:32 UTC by RR
Modified: 2019-07-25 11:40 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description RR 2019-07-08 10:32:05 UTC
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 RR 2019-07-08 12:26:43 UTC
Addressed in https://github.com/dlang/druntime/pull/2670