Summary: UFCS problem with @property and structs
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from 2012-03-08 05:00:11 PST ---
Modified from an example by Comrad in D.learn.

struct A {
    double x;
@property ref double y(ref A a) {
    return a.x;
void main() {
    A a1;
    a1.y() = 2.0; // OK
    a1.y = 2.0; // Error

DMD 2.059head gives:

test.d(10): Error: no property 'y' for type 'A', did you mean 'x'?

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

Reply via email to