[Issue 1059] String literal concatenated with array of chars - inconsistent behavior
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Aug 23 03:29:06 PDT 2008
http://d.puremagic.com/issues/show_bug.cgi?id=1059
matti.niemenmaa+dbugzilla at iki.fi changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |matti.niemenmaa+dbugzilla at ik
| |i.fi
Severity|minor |normal
OS/Version|Linux |All
Platform|PC |All
------- Comment #2 from matti.niemenmaa+dbugzilla at iki.fi 2008-08-23 05:29 -------
Annoying because this limits the use of array literals in templates, A doesn't
compile in the following:
//template A(char a, char b) { const char[] A = [a] ~ [b]; }
template B(char[] a, char[] b) { const char[] B = a ~ b ; }
void main() {
// static assert (A!('a', 'b') == "ab");
static assert (B!("a", "b") == "ab");
static assert (['a'] ~ ['b'] == "ab");
}
--
More information about the Digitalmars-d-bugs
mailing list