www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 3910] New: Explicit template instantiations for functions used as array properties?

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

           Summary: Explicit template instantiations for functions used as
                    array properties?
           Product: D
           Version: 2.041
          Platform: Other
        OS/Version: Mac OS X
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: biozic free.fr



Shouldn't the last line of the following code compile?

---
void foo(T)(T[] array) {}

void main()
{
    int[] a = [1, 2, 3];
    foo(a); // OK
    foo!int(a); // OK
    a.foo(); // OK
    //a.foo!int(); // Error: foo(a) isn't a template
}
---

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 09 2010
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3910


Kasumi Hanazuki <k.hanazuki gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |k.hanazuki gmail.com
         Resolution|                            |WORKSFORME



PDT ---
That code now works with dmd 2.059HEAD.

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