What    |Removed                     |Added
           Platform|Other                       |All
            Version|unspecified                 |D2
         OS/Version|Windows                     |All

--- Comment #1 from 2011-07-22 04:07:10 PDT ---
I believe the previous versions are accept-invalid. The leading 'const' is
equivalent to the trailing 'const', which is applying the 'const' to 'this'
only. Therefore, the function's type is in fact

    ref int get() const;

If you want to return a const int, apply it directly on the return type.

struct foo
    ref const(int) get() const { return bar[0]; }
  //    ^^^^^^^^^^
    int bar[1];

void main(){
 auto a = foo();

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

Reply via email to