Bug 20684 – "Error: unknown" with some bad nested struct/template declarations

Status
NEW
Severity
normal
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2020-03-17T23:19:21Z
Last change time
2024-12-13T19:07:49Z
Keywords
ice
Assigned to
No Owner
Creator
Vladimir Panteleev
Moved to GitHub: dmd#19682 →

Comments

Comment #0 by dlang-bugzilla — 2020-03-17T23:19:21Z
/////////////// test.d /////////////// struct RD { struct BB { R!RD r; } Undeclared undeclared; struct VV { vector!int v; } struct VVV { vector!VV vv; } } struct R(T) { static if (is(typeof(*p = *p))) { } T* p; } struct vector(T) { Array!T array; } struct Array(T) { struct Payload { T[] _payload; } ~this() { foreach (e; _data._payload) {} } Payload _data; this()() { } } ////////////////////////////////////// Compiler says: $ dmd test.d Error: unknown, please file report on issues.dlang.org test.d(17): Error: template instance test.vector!(VV) error instantiating
Comment #1 by dlang-bugzilla — 2020-04-20T05:00:00Z
Compilation succeeds in DMD 2.085 but not newer. Bisecting shows that the error message begins manifesting when it was introduced ( https://github.com/dlang/dmd/pull/9425 ), however debug versions of DMD have been failing with an assertion failure before that change. The assertion failures began after https://github.com/dlang/dmd/pull/6690 . See also issue 20753
Comment #2 by robert.schadek — 2024-12-13T19:07:49Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19682 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB