Open zerongjiang opened 8 years ago
If you examine the a rough callstack of Sub.new(11)
call:
- `main`
- `Contract String => Any - validator`
- `Sub.initialize`
- `super`
- `Contract Num => Any - validator`
- `Super.initialize`
I don't think it is possible at the moment. For that to be possible. It looks like there should be a way to unregister
the contract for the current class. Even then, I don't think it would be easy to implement. Not saying that it will be weird in the user code..
Another thing is to try making some helper, like contracts_super
for usage instead of super
. But that will change your code too much (you will have to provide all arguments to contracts_super
at any point of time). And it will be way confusing for any new to the codebase..
Is that possible to make this work?
Only override the contract for the override method,
Thanks!