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: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Kenji Hara <[email protected]> 2012-01-24 04:54:11 PST ---
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: -------