https://issues.dlang.org/show_bug.cgi?id=22516
Issue ID: 22516
Summary: Segfault for function literal in struct initializer
with previous errors
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: regression
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
The following code segfaults since 2.072:
struct Data
{
void function() eval;
}
struct Builtins
{
X x; // Unknown type X
Data myData = { (){} };
}
The problem here is that the error in `x` causes semantic3 for the function
literal to be skipped because of errors in the parent. Later code tries to
access the missing return type of the function literal.
--