www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 2691] New: Property syntax does not work with template methods

reply d-bugmail puremagic.com writes:

           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 digitalmars.com
        ReportedBy: dhasenan 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;

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

Feb 25 2009
parent d-bugmail puremagic.com writes:

yebblies <yebblies gmail.com> changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
                 CC|                            |yebblies gmail.com
         Resolution|                            |FIXED

--- Comment #1 from yebblies <yebblies gmail.com> 2011-06-10 08:05:40 PDT ---
This works in current dmd1.063

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