[Issue 7278] New: Templated struct (instantiated with null) can't	access its own members (DMD confused about struct's type)
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Thu Jan 12 00:49:38 PST 2012
    
    
  
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 at puremagic.com
        ReportedBy: cbkbbejeap at mailinator.com
--- Comment #0 from Nick Sabalausky <cbkbbejeap at mailinator.com> 2012-01-12 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: -------
    
    
More information about the Digitalmars-d-bugs
mailing list