www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 10697] New: Syntactically Incorrect Alias This Causes Object to Conflict with Itself

http://d.puremagic.com/issues/show_bug.cgi?id=10697

           Summary: Syntactically Incorrect Alias This Causes Object to
                    Conflict with Itself
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: monkeyworks12 hotmail.com


--- Comment #0 from monkeyworks12 hotmail.com 2013-07-22 10:35:52 PDT ---
import std.stdio;

struct Test1
{
    int i;
}

struct Test2
{
    Test1 test1;
    alias this test1;
}

void main()
{
    Test2 test2;
    writeln(test2.i);
}

/d995/f66.d(11): Error: alias f66.Test2.test1 conflicts with variable
f66.Test2.test1 at /d995/f66.d(10)


This also fails on GDC 2.060 and LDC 2.060, and whatever version of git HEAD
dpaste is using.

http://dpaste.dzfl.pl/5f8bb3f4

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