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.
Comment #1 by k.hara.pg — 2013-09-28T23:05:17Z
Comment #2 by github-bugzilla — 2013-09-30T12:07:55Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/b6ddb94604faee2eaecdd76fb89738e38826828c fix Issue 10495 - Incorrect "initializer required" error using lambdas in class with fields with disabled default construction https://github.com/D-Programming-Language/dmd/commit/ccb3529bae08954c75a83dbcfe89f6d8356fec0b Merge pull request #2595 from 9rnsr/fix10495 Issue 10495 - Incorrect "initializer required" error using lambdas in class with fields with disabled default construction