digitalmars.D.bugs - [Issue 22136] New: hashOf failed to compile because of different
- d-bugmail puremagic.com (44/44) Jul 22 2021 https://issues.dlang.org/show_bug.cgi?id=22136
https://issues.dlang.org/show_bug.cgi?id=22136 Issue ID: 22136 Summary: hashOf failed to compile because of different inheritance order in DMD 2.097.1 Product: D Version: D2 Hardware: All OS: Windows Status: NEW Severity: critical Priority: P1 Component: druntime Assignee: nobody puremagic.com Reporter: bitworld qq.com Compiler: DMD 2.097.1 Error: ``` ../../src/druntime/import/core/internal/hash.d(612,33): Error: expected 2 arguments for `getMember` but had 1 source/app.d(30,26): Error: template instance `core.internal.hash.hashOf!(Bug!string)` error instantiating ``` Test Code: ``` import std.range; interface IObject { size_t toHash() trusted nothrow; } interface Bug(E) : InputRange!E, IObject { } interface OK(E) : IObject, InputRange!E { } void main() { { Bug!string s; size_t t = hashOf(s); } { OK!string s; size_t t = hashOf(s); } } ``` --
Jul 22 2021