D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 3099 - std.metastrings.Format example can not compile
Summary: std.metastrings.Format example can not compile
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: x86 Windows
: P2 normal
Assignee: Andrei Alexandrescu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-27 02:18 UTC by Sam Hu
Modified: 2015-06-09 01:27 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Sam Hu 2009-06-27 02:18:45 UTC
Below code snippet is from std.metastrings:

string s=Format!("Arg %s=%s","foo",27);
writefln(s);// "Arg foo = 27"

can't compile,error msg:
testFormat.d(30): Error: cannot implicitly convert expression ("Arg %s=%sfoo27") of type const(char[]) to immutable(char)[]


Not sure whether this is a bug.
Comment 1 Andrei Alexandrescu 2010-09-26 16:25:40 UTC
Fixed a while ago.