file 1: camera.d
-----------------------
module camera;
class Camera
{
public:
    // Camera Attributes
    vec3 position = vec3(0.0f, 0.0f, 0.0f);
        . . .
};
-----------------------


file 2: main.d
-----------------------
module main;
import camera;
Camera camera;  // Compile error (1)
-----------------------

(1) variable main.camera conflicts with import main.camera at main.d(30)

Renaming "Camera camera;" to "Camera cam;" gets rid of the error
but now I've got tons of new undefined references with camera.

Have I broken some rule by having file name, module name, class name and object name being all cameras? Is there some technique I can use to get Camera camera; to compile?

I can workaround the problem but it seems like a kludge; I'm curious about the subtleties of this problems.

Reply via email to