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


--- Comment #0 from biozic <biozic free.fr> 2010-03-09 00:40:11 PST ---
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


--- Comment #1 from Kasumi Hanazuki <k.hanazuki gmail.com> 2012-03-13 18:12:12
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