https://issues.dlang.org/show_bug.cgi?id=14388
Issue ID: 14388
Summary: Assertion failed: (type->ty != Tstruct || ((TypeStruct
*)type)->sym == this)
Product: D
Version: D2
Hardware: x86_64
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: DMD
Assignee: [email protected]
Reporter: [email protected]
Reduced test:
---
struct Data(A a)
{
auto foo()
{
return Data!a.init;
}
}
struct A
{
struct Item {}
immutable(Item)[] items;
this(int dummy)
{
items = [Item()].idup; // No error with .dup
}
}
void main()
{
auto test = Data!(A(42)).init.foo();
}
---
DMD 2.067.0:
Assertion failed: (type->ty != Tstruct || ((TypeStruct *)type)->sym == this),
function semantic, file struct.c, line 929.
--