www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Error: cannot implicitly convert expression

reply "Suliman" <evermind live.ru> writes:
import std.stdio;
import std.conv;
import std.string;
import std.net.curl;

void main()
{
string content = get("d-lang.appspot.com/testUrl2");
}



Error: cannot implicitly convert expression (get("d-lang.appsp
ot.com/testUrl2", AutoProtocol())) of type char[] to string


code from: http://dlang.org/phobos/std_net_curl.html#get
Oct 23 2014
parent reply "Suliman" <evermind live.ru> writes:
Solution 
http://forum.dlang.org/thread/bgkklxwbhrqdhvethnco forum.dlang.org#post-l639dt:24vlj:241:40digitalmars.com

Am I right understand that it's bug in doc?
Oct 23 2014
parent "Jonathan M Davis" <jmdavisProg gmx.com> writes:
On Thursday, 23 October 2014 at 19:18:33 UTC, Suliman wrote:
 Solution 
 http://forum.dlang.org/thread/bgkklxwbhrqdhvethnco forum.dlang.org#post-l639dt:24vlj:241:40digitalmars.com

 Am I right understand that it's bug in doc?
It certainly looks like one. std.net.curl's documentation examples aren't generally generated with ddoc-ed unittest blocks (because that would require hitting sites on the internet), so its examples are more likely to be buggy than is the case with many other modules. - Jonathan M Davis
Oct 23 2014