Thread overview
mixin bug?
Sep 03, 2004
shinichiro.h
Sep 05, 2004
shinichiro.h
September 03, 2004
Hello,

The following codes cause error:

--- split.d

template Split() {
    void split() {
        Game.obj.addShot(new Shot());
    }
}

--- game.d

private import shot;
class Game {
    static Shot[] shots;
    static void addShot(Shot s) { shots ~= s; }
}

--- shot.d

private import game;
private import split;
class Shot {
    mixin Split;
}


The error message is

split.d(3): no property 'obj' for type 'Game'

I think mixin Split has module shot's scope. So they are not wrong. And even if I add "private import game;" to split.d, I met same error. Is it bug?

------------------
 shinichiro.h
September 04, 2004
> split.d(3): no property 'obj' for type 'Game'

have you shortened your code?  because there really doesn't seem to be an 'obj' property for Game.


September 05, 2004
> have you shortened your code?  because there really doesn't seem to be an 'obj' property for Game.

Oooops! I'm sorry. I'll reshorten my code and report again.

------------------
 shinichiro.h