Summary: Members of non-lvalues can be assigned to.
           Product: D
           Version: 2.030
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

struct S { int a = 0; }
S foo() { S s; return s; }

void main()
    foo.a = 42;

This compiles but is nonsensical.  It is impossible to modify foo.a, yet the
compiler lets you try anyway.  

Tried it with DMD 2.030 on Linux.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to