Bug 10495 – Incorrect "initializer required" error using lambdas in class with fields with disabled default construction
Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-06-28T08:18:00Z
Last change time
2013-09-30T12:08:03Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
verylonglogin.reg
Comments
Comment #0 by verylonglogin.reg — 2013-06-28T08:18:41Z
This blocks usage of `std.range` and `std.algorithm` functions in some cases:
---
struct S0
{ @disable this(); }
struct S(alias f)
{
void g() { }
}
class C
{
S0 s = S0.init;
void h()
{
S!(a => a) st; // Error: variable main.C.h.st initializer required for type S!(__lambda2)
}
}
---
May be related to Issue 7892.