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

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 7359 - Template function with typesafe variadic rejects more than one string arguments
Summary: Template function with typesafe variadic rejects more than one string arguments
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 normal
Assignee: No Owner
URL:
Keywords: patch, rejects-valid
Depends on:
Blocks:
Reported: 2012年01月24日 04:54 UTC by Kenji Hara
Modified: 2012年01月24日 11:31 UTC (History)
1 user (show)

See Also:


Attachments
Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this issue.
Description Kenji Hara 2012年01月24日 04:54:11 UTC
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 Kenji Hara 2012年01月24日 04:57:48 UTC
https://github.com/D-Programming-Language/dmd/pull/637 
Comment 2 github-bugzilla 2012年01月24日 11:02:49 UTC
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 timon.gehr 2012年01月24日 11:31:50 UTC
Looks as if this is safe to close now.


AltStyle によって変換されたページ (->オリジナル) /