www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 7359] New: Template function with typesafe variadic rejects more than one string arguments

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

           Summary: Template function with typesafe variadic rejects more
                    than one string arguments
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: k.hara.pg gmail.com



bool foo(T)(T[] a ...) {
  return true;
}

void main() {
  assert(foo(1,1,1,1,1,1));               // OK
  assert(foo("abc"));                     // OK, T == immutable(char)
  assert(foo("abc","abc","abc","abc"));   // NG, T should be deduced to string
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 24 2012
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7359


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch



https://github.com/D-Programming-Language/dmd/pull/637

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 24 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7359




Commits pushed to https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/141b85fff1c7104dc2c64f48f0573ea7d50e7d29
fix Issue 7359 - Template function with typesafe variadic rejects more than one
string arguments

https://github.com/D-Programming-Language/dmd/commit/c9f0d0646ad3dde8a383f6f195763459e5d9a35b


Issue 7359 - Template function with typesafe variadic rejects more than one
string arguments

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 24 2012
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7359


timon.gehr gmx.ch changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |timon.gehr gmx.ch
         Resolution|                            |FIXED



Looks as if this is safe to close now.

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