Bug 7359 – Template function with typesafe variadic rejects more than one string arguments

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-01-24T04:54:00Z
Last change time
2012-01-24T11:31:50Z
Keywords
patch, rejects-valid
Assigned to
nobody
Creator
k.hara.pg

Comments

Comment #0 by k.hara.pg — 2012-01-24T04:54:11Z
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 }
Comment #1 by k.hara.pg — 2012-01-24T04:57:48Z
Comment #2 by github-bugzilla — 2012-01-24T11:02:49Z
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 Merge pull request #637 from 9rnsr/fix7359 Issue 7359 - Template function with typesafe variadic rejects more than one string arguments
Comment #3 by timon.gehr — 2012-01-24T11:31:50Z
Looks as if this is safe to close now.