www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 7307] New: Not fully enforced properties syntax

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7307

           Summary: Not fully enforced properties syntax
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: accepts-invalid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: bearophile_hugs eml.cc



Currently (DMD 2.058head) this code compiles with no errors if you compile it
with -property -w:


 property size_t len(T)(in T[] a) {
    return a.length;
}
void main() {
    int[10] a;
    assert(a.len() == 10);
}


But I think the -property has to statically refuse code that uses () on
properties.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 17 2012
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7307


SomeDude <lovelydear mailmetrash.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |lovelydear mailmetrash.com



PDT ---
Why ?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 19 2012