digitalmars.D.bugs - mixin bug?
- "shinichiro.h" <s31552 mail.ecc.u-tokyo.ac.jp> Sep 03 2004
- "Jarrett Billingsley" <kb3ctd2 yahoo.com> Sep 04 2004
- "shinichiro.h" <s31552 mail.ecc.u-tokyo.ac.jp> Sep 05 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
Sep 03 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.
Sep 04 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
Sep 05 2004









"Jarrett Billingsley" <kb3ctd2 yahoo.com> 