[Issue 4501] Can't call templated properties as properties from within class

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Dec 2 16:28:48 PST 2010


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


Stanislav Blinov <stanislav.blinov at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |stanislav.blinov at gmail.com
           Platform|Other                       |All
         OS/Version|Windows                     |All


--- Comment #1 from Stanislav Blinov <stanislav.blinov at gmail.com> 2010-12-02 16:27:16 PST ---
This seems related, though error manifests outside of class body:

class Bar
{
    @property T num(T = int)() const // Note default type
    { 
        T result;
        //...
        return result;
    }
}

void main()
{
    auto bar = new Bar;
    auto n1 = bar.num!int; // Ok
    auto n2 = bar.num; // Error: Bar.num(T = int) has no value
    auto n3 = bar.num!float; // Ok
}

I don't know if it's worth separate issue report.

-- 
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