[Issue 6454] New: @property doesn't need return type
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Mon Aug  8 03:23:24 PDT 2011
    
    
  
http://d.puremagic.com/issues/show_bug.cgi?id=6454
           Summary: @property doesn't need return type
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: simendsjo at gmail.com
--- Comment #0 from simendsjo <simendsjo at gmail.com> 2011-08-08 03:23:22 PDT ---
For @property, the return type is inferred even without the auto return type:
struct S {
    @property p() { // missing bool/auto
        return true;
    }
}
void main() {
    S s;
    static assert(is(typeof(s.p) == bool)); // ok
}
-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
    
    
More information about the Digitalmars-d-bugs
mailing list