Error not callable with argument types but types matches

2015-11-07 Thread Sliya via Digitalmars-d-learn
Hello, I have some troubles solving this compilation error: Error: constructor cell.Cell.this (int x, int y, Noise noise) is not callable using argument types (int, int, Perlin) The thing is Perlin implements the Noise interface. Here is the line from cell.d throwing this error: _terrain[h]

Re: Error not callable with argument types but types matches

2015-11-07 Thread Adam D. Ruppe via Digitalmars-d-learn
Are you sure it is the same Noise on both sides? Two separate imports might define different interfaces with the same name and that could be what's causing the confusion here.

Re: Error not callable with argument types but types matches

2015-11-07 Thread Sliya via Digitalmars-d-learn
On Saturday, 7 November 2015 at 17:27:00 UTC, Adam D. Ruppe wrote: Are you sure it is the same Noise on both sides? Two separate imports might define different interfaces with the same name and that could be what's causing the confusion here. You sir are my savior ! I imported "Noise" instead

Re: Error not callable with argument types but types matches

2015-11-07 Thread Adam D. Ruppe via Digitalmars-d-learn
On Saturday, 7 November 2015 at 17:31:53 UTC, Sliya wrote: I imported "Noise" instead of "noise". What I don't get is that I have no file named "Noise", so why doesn't the line import Noise; throws a compilation error ? Are you on Windows? File loads there ignore case by name so the compiler

Re: Error not callable with argument types but types matches

2015-11-07 Thread Sliya via Digitalmars-d-learn
On Saturday, 7 November 2015 at 17:43:02 UTC, Adam D. Ruppe wrote: Are you on Windows? File loads there ignore case by name so the compiler tries to load "Noise.d" and Windows will let you open "noise.d" too. To avoid this kind of thing, I always put a `module your.name;` at the top of every

Re: Error not callable with argument types but types matches

2015-11-08 Thread anonymous via Digitalmars-d-learn
On 08.11.2015 08:17, Sliya wrote: I am on Mac OS, but I still don't get it. If the import was not case-sensitive, I would not have any error since the good file would have been loaded... Here I have no error saying file not found yet the file is not loaded. I'd love to know what really happens.