July 08, 2019 [Issue 20034] New: [Reg 2.087.0] hashOf of a non-scalar enum doesn't compile | ||||
---|---|---|---|---|
| ||||
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@puremagic.com Reporter: radu.racariu@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 -- |
Copyright © 1999-2021 by the D Language Foundation