www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 16258] New: std.net.curl (download) failed

https://issues.dlang.org/show_bug.cgi?id=16258

          Issue ID: 16258
           Summary: std.net.curl (download) failed
           Product: D
           Version: D2
          Hardware: x86
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: skelirox yandex.com

Hi, I tried this example in here -
https://dlang.org/phobos/std_net_curl.html#download , but after running gdc
program.d -o program, it spit out this errors.

hello.d:2:9: error: unexpected ( in declarator
 download("d-lang.appspot.com/testUrl2", "/tmp/downloaded-http-file");
         ^
hello.d:2:10: error: basic type expected, not "d-lang.appspot.com/testUrl2"
 download("d-lang.appspot.com/testUrl2", "/tmp/downloaded-http-file");
          ^
hello.d:2:10: error: found '"d-lang.appspot.com/testUrl2"' when expecting ')'
 download("d-lang.appspot.com/testUrl2", "/tmp/downloaded-http-file");
          ^
hello.d:2:39: error: no identifier for declarator download(int)
 download("d-lang.appspot.com/testUrl2", "/tmp/downloaded-http-file");
                                       ^
hello.d:2:39: error: semicolon expected following function declaration
 download("d-lang.appspot.com/testUrl2", "/tmp/downloaded-http-file");
                                       ^
hello.d:2:39: error: Declaration expected, not ','
 download("d-lang.appspot.com/testUrl2", "/tmp/downloaded-http-file");
                                       ^
skelirox pc:~$ gdc hello.d -o hello
hello.d:2:9: error: unexpected ( in declarator
 download("d-lang.appspot.com/testUrl2", "/tmp/downloaded-http-file");
         ^
hello.d:2:10: error: basic type expected, not "d-lang.appspot.com/testUrl2"
 download("d-lang.appspot.com/testUrl2", "/tmp/downloaded-http-file");
          ^
hello.d:2:10: error: found '"d-lang.appspot.com/testUrl2"' when expecting ')'
 download("d-lang.appspot.com/testUrl2", "/tmp/downloaded-http-file");
          ^
hello.d:2:39: error: no identifier for declarator download(int)
 download("d-lang.appspot.com/testUrl2", "/tmp/downloaded-http-file");
                                       ^
hello.d:2:39: error: semicolon expected following function declaration
 download("d-lang.appspot.com/testUrl2", "/tmp/downloaded-http-file");
                                       ^
hello.d:2:39: error: Declaration expected, not ','
 download("d-lang.appspot.com/testUrl2", "/tmp/downloaded-http-file");
                                       ^
skelirox pc:~$ gdc-5 hello.d -o hello
hello.d:2:9: error: unexpected ( in declarator
 download("d-lang.appspot.com/testUrl2", "/tmp/downloaded-http-file");
         ^
hello.d:2:10: error: basic type expected, not "d-lang.appspot.com/testUrl2"
 download("d-lang.appspot.com/testUrl2", "/tmp/downloaded-http-file");
          ^
hello.d:2:10: error: found '"d-lang.appspot.com/testUrl2"' when expecting ')'
 download("d-lang.appspot.com/testUrl2", "/tmp/downloaded-http-file");
          ^
hello.d:2:39: error: no identifier for declarator download(int)
 download("d-lang.appspot.com/testUrl2", "/tmp/downloaded-http-file");
                                       ^
hello.d:2:39: error: semicolon expected following function declaration
 download("d-lang.appspot.com/testUrl2", "/tmp/downloaded-http-file");
                                       ^
hello.d:2:39: error: Declaration expected, not ','
 download("d-lang.appspot.com/testUrl2", "/tmp/downloaded-http-file");


I don't think the error is because the link.

--
Jul 09 2016