[Issue 9807] with statement does not work with alias this

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Nov 22 03:32:34 PST 2013


https://d.puremagic.com/issues/show_bug.cgi?id=9807


yebblies <yebblies at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |yebblies at gmail.com
         Resolution|DUPLICATE                   |FIXED


--- Comment #2 from yebblies <yebblies at gmail.com> 2013-11-22 22:32:31 EST ---
This was not a dupe of issue 6711, it asks for properties of built-in types to
be accessible via with.

eg this doesn't work

void main()
{
    int[int] aa;
    with(aa)
    {
    }
}

Making this work for AAs is questionable, as this doesn't work:

void main()
{
    struct S { int[] a; alias a this; }
    S x;
    with(x)
    {
        length;
    }
}

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


More information about the Digitalmars-d-bugs mailing list