Bug 6694 – with statement doesn't work with functions that return structs

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Windows
Creation time
2011-09-19T09:14:00Z
Last change time
2011-09-19T18:02:33Z
Assigned to
nobody
Creator
andrej.mitrovich

Comments

Comment #0 by andrej.mitrovich — 2011-09-19T09:14:03Z
struct Foo { } Foo foo() { Foo _foo; return _foo; } void main() { with (foo()) { } } Error: foo() is not an lvalue For me this is particularly a problem when using property functions.
Comment #1 by yebblies — 2011-09-19T18:02:33Z
*** This issue has been marked as a duplicate of issue 6685 ***