digitalmars.D.bugs - mixin bug?
- shinichiro.h (27/27) Sep 03 2004 Hello,
- Jarrett Billingsley (2/3) Sep 04 2004 have you shortened your code? because there really doesn't seem to be a...
- shinichiro.h (3/5) Sep 05 2004 Oooops! I'm sorry. I'll reshorten my code and report again.
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