Re: Why is my code does not compile? (dmd 2.021 linux)

2008-12-12 Thread Weed
Bill Baxter пишет: Ref return values are a very new feature in D2. I suspect its just a bug that they don't work on inner functions yet. --bb message implies that the authors are aware of this limitation? report they do not need? No, a report is probably needed. There are lots of bugs with

Re: Why is my code does not compile? (dmd 2.021 linux)

2008-12-12 Thread Bill Baxter
2008/12/13 Weed : > Bill Baxter пишет: >> >> On Sat, Dec 13, 2008 at 5:45 AM, Weed wrote: >>> >>> void main() >>> { >>> int i; >>> >>> ref int func() >>> { >>> return i; >>> } >>> >>> func() = 4; >>> } >>> >>> lval.d(5): found 'ref' instead of statement >>> lval.d(10): no identifier

Re: Why is my code does not compile? (dmd 2.021 linux)

2008-12-12 Thread Weed
Bill Baxter пишет: On Sat, Dec 13, 2008 at 5:45 AM, Weed wrote: void main() { int i; ref int func() { return i; } func() = 4; } lval.d(5): found 'ref' instead of statement lval.d(10): no identifier for declarator func lval.d(11): unrecognized declaration but code like t

Re: Why is my code does not compile? (dmd 2.021 linux)

2008-12-12 Thread Bill Baxter
On Sat, Dec 13, 2008 at 5:45 AM, Weed wrote: > > void main() > { >int i; > >ref int func() >{ > return i; >} > >func() = 4; > } > > lval.d(5): found 'ref' instead of statement > lval.d(10): no identifier for declarator func > lval.d(11): unrecognized declaration > > > but

Why is my code does not compile? (dmd 2.021 linux)

2008-12-12 Thread Weed
void main() { int i; ref int func() { return i; } func() = 4; } lval.d(5): found 'ref' instead of statement lval.d(10): no identifier for declarator func lval.d(11): unrecognized declaration but code like this compiles: ref int func() { int* i = new int; return