Bug 2619 – Locally-instantiated structs are not instantiated locally

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Linux
Creation time
2009-01-26T15:38:00Z
Last change time
2015-06-09T05:15:07Z
Keywords
diagnostic, rejects-valid
Assigned to
bugzilla
Creator
andrei

Comments

Comment #0 by andrei — 2009-01-26T15:38:08Z
struct A(alias F) { int fun(int i) { return F(i); } } A!(F) makeA(alias F)() {return A!(F)(); } void main() { int x = 40; int fun(int i) { return x + i; } A!(fun) a = makeA!(fun)(); a.fun(2); } function test.main.A!(fun).A.fun cannot get frame pointer to main The struct should be instantiated locally and save the frame pointer to the caller.
Comment #1 by bugzilla — 2009-03-11T14:57:14Z
Fixed dmd 2.026