www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 7278] New: Templated struct (instantiated with null) can't access its own members (DMD confused about struct's type)

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

           Summary: Templated struct (instantiated with null) can't access
                    its own members (DMD confused about struct's type)
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: cbkbbejeap mailinator.com



00:49:37 PST ---
struct Foo(string s)
{
    string var;
    void func()
    {
        string local = var;
    }
}

Foo!null a;
Foo!null b;

---------------------------
Result:
test.d(6): Error: this for var needs to be type Foo not type Foo!(null)
---------------------------

Both 'a' and 'b' need to be there to trigger this bug.

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


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch
           Platform|Other                       |All
         OS/Version|Windows                     |All



https://github.com/D-Programming-Language/dmd/pull/616

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


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla digitalmars.com
         Resolution|                            |FIXED



23:21:44 PST ---
https://github.com/D-Programming-Language/dmd/commit/f800f6e342e2d9ab1ec9a6275b8239463aa1cee8

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