Thread overview | |||||
---|---|---|---|---|---|
|
September 03, 2004 mixin bug? | ||||
---|---|---|---|---|
| ||||
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 Re: mixin bug? | ||||
---|---|---|---|---|
| ||||
Posted in reply to shinichiro.h | > 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 Re: mixin bug? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jarrett Billingsley | > 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
|
Copyright © 1999-2021 by the D Language Foundation