December 04, 2017
On Monday, 4 December 2017 at 11:05:22 UTC, Vino wrote:
> On Monday, 4 December 2017 at 10:46:03 UTC, rikki cattermole wrote:

> FunTest.d(52): Error: template FunTest.ptProcessFiles cannot deduce function from argument types !()(string, Array!(Tuple!(string, string)) function(string FFs,
>  string Step, int DirAged), File, File, string, int), candidates are:
> FunTest.d(24):        FunTest.ptProcessFiles()(Array!string Dirlst, Array!(Tuple!(string, string)) function(string, string, int) coRoutine, File logF, File logE
> , string Step, int Aged)
> Failed: ["dmd", "-v", "-o-", "FunTest.d", "-I."]

Why do I get a different error?:

.../linux/bin64/../../src/phobos/std/datetime.d(106): Error: module std.datetime from file .../linux/bin64/../../src/phobos/std/datetime.d conflicts with package name datetime
December 04, 2017
On Monday, December 04, 2017 20:02:30 kdevel via Digitalmars-d-learn wrote:
> On Monday, 4 December 2017 at 11:05:22 UTC, Vino wrote:
> > On Monday, 4 December 2017 at 10:46:03 UTC, rikki cattermole wrote:
> >
> > FunTest.d(52): Error: template FunTest.ptProcessFiles cannot
> > deduce function from argument types !()(string,
> > Array!(Tuple!(string, string)) function(string FFs,
> >
> >  string Step, int DirAged), File, File, string, int),
> >
> > candidates are:
> > FunTest.d(24):        FunTest.ptProcessFiles()(Array!string
> > Dirlst, Array!(Tuple!(string, string)) function(string, string,
> > int) coRoutine, File logF, File logE
> > , string Step, int Aged)
> > Failed: ["dmd", "-v", "-o-", "FunTest.d", "-I."]
>
> Why do I get a different error?:
>
> .../linux/bin64/../../src/phobos/std/datetime.d(106): Error: module std.datetime from file .../linux/bin64/../../src/phobos/std/datetime.d conflicts with package name datetime

That implies you have a borked install of dmd. How did you install it? You didn't do something like unzip a newer release on top of an older one did you? If you're using the zip file to install dmd, you have to blow away the previous install before copying over the new one, or you're screwed anytime that files get removed or moved around. I wouldn't expect that particular error if dmd were installed via the package manager.

In 2.076.0, std.datetime was split into a package. So, if you somehow ended up with both the old files and new ones, there's a conflict. With 2.076.0, it could result in linker problems, because the compiler didn't properly detected it, but it was since fixed so that the compiler sees that you have both module and a package of the same name and gives an error.

- Jonathan M Davis

December 05, 2017
On Monday, 4 December 2017 at 19:25:15 UTC, Ali Çehreli wrote:
> On 12/04/2017 04:52 AM, Vino wrote:
>
> > [...]
>
> Every expression has a type. 'auto' in that context (or 'const', etc.) just helps with not spelling-out that type. You can see the type with pragma(msg) and typeof:
>
> [...]

Hi Ali,

 Thank you very much, was able to resolve the issue using the template method.

From,
Vino.B
1 2
Next ›   Last »