Re: with() statement doesn't want to work with property functions

2011-09-19 Thread Timon Gehr
On 09/18/2011 05:14 PM, Andrej Mitrovic wrote: struct Bar { int x; } struct Foo { Bar _bar; Bar bar() { return _bar; } } void main() { Foo foo; with (foo.bar) { } } Error: foo.bar() is not an lvalue I've made a getter because I want to control h

with() statement doesn't want to work with property functions

2011-09-19 Thread Andrej Mitrovic
struct Bar { int x; } struct Foo { Bar _bar; Bar bar() { return _bar; } } void main() { Foo foo; with (foo.bar) { } } Error: foo.bar() is not an lvalue I've made a getter because I want to control how _bar is manipulated. I've lost the ability to use the w