November 13, 2020 [Issue 21387] New: dmd.hdrgen - Wrong parent in pretty name for aggregate instantiated with lambda template | ||||
|---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=21387 Issue ID: 21387 Summary: dmd.hdrgen - Wrong parent in pretty name for aggregate instantiated with lambda template Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody@puremagic.com Reporter: kinke@gmx.net --- struct ChunkByImpl(alias pred) {} auto chunkBy(alias pred)() { return ChunkByImpl!pred(); } void main() { auto foo1 = () => chunkBy!((char a) => a == '_'); auto foo2 = () => chunkBy!((a) => a == '_'); import std.stdio; writeln("foo1: " , typeid(foo1()).name); writeln("foo2: " , typeid(foo2()).name); } --- Actual output: --- foo1: onlineapp.ChunkByImpl!(function (char a) pure nothrow @nogc @safe => cast(int)a == 95).ChunkByImpl foo2: onlineapp.main.__lambda2.ChunkByImpl!(__lambda1).ChunkByImpl --- Expected output for foo2: onlineapp.ChunkByImpl!(__lambda1).ChunkByImpl With QualifyTypes = true: onlineapp.ChunkByImpl!(onlineapp.main.__lambda2.__lambda1).ChunkByImpl -- | ||||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply