[Issue 2691] New: Property syntax does not work with template methods

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Feb 25 17:47:49 PST 2009


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

           Summary: Property syntax does not work with template methods
           Product: D
           Version: 1.00
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: dhasenan at gmail.com


The following example should work but instead results in an error:
"Error: template doNothing!(int) is not a member of s.chain"

struct Struct
{
    Struct chain()
    {
        return *this;
    }

    void doNothing(T)(){}
}

void main ()
{
    Struct s;
    s.chain.doNothing!(int);
}


I think this limitation has existed since time immemorial, but I haven't tried
it with any dmd version before 1.00.


-- 



More information about the Digitalmars-d-bugs mailing list