You can't call things like super()
or A()
so you have no way to call the unnamed fallback function.
However, if you can modify the parent contract, you can move all the logic of your fallback function to another named function that would be called from the callback in A
and that would be callable from LittleA
.
Here is an exemple with two contracts named Parent and Child. The fallback()
function can be called from Child using super.fallback()
.
contract Parent{
function fallback() internal {
log0("Parent fallback function");
}
function (){
fallback();
}
}
contract Child is Parent {
function (){
log0("child fallback function");
super.fallback();
}
}
Sending a basic transaction to Child
contract will call its fallback function which calls Parent.fallback()
using. The result is :
LOG (Child): child fallback function
LOG (Child): Parent fallback function
I admit that this not the most beautiful design but as you set the visibility of fallback()
to internal
, it's not visible into the ABI so you're good.