← Back to index
|
Original Bugzilla link
Bug 7813 – lambda lost during header gen
Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-04-02T17:56:00Z
Last change time
2013-10-11T07:15:04Z
Assigned to
nobody
Creator
code
Comments
Comment #0
by code — 2012-04-02T17:56:48Z
cat > bug.d << CODE void foo(alias pred)() { } void bar() { foo!(a => a + 1)(); } CODE dmd -H -o- -c bug -------- The lambda template is not emitted and leaving the header with an unknown symbol. foo!(__lambda2)();
Comment #1
by k.hara.pg — 2013-10-11T07:15:04Z
With 2.064 git-head, void foo(alias pred)() { } void bar()() // Make template to output function body in di file { foo!(a => a + 1)(); } dmd -H -o- test.d Outputs: // D import file generated from 'test.d' template foo(alias pred) { void foo() { } } template bar() { void bar() { foo!((a) => a + 1)(); // correct } }