Archived
This forum has been archived. Please start a new discussion on GitHub.
Forward referencing interfaces in slice
Nis Baggesen
in Help Center
I have two interfaces in a slice definition file where i basically want to do this:
interface A {
register(B* proxy);
}
interface B {
register(A* proxy);
}
Obviously I get an error in interface A, as B is not defined at that time. However because I'm dealing with interfaces and not classes it is appearently impossible to make a predefinition of B.
It might be feasible to translate the setup into classes (Where I could make the forward definition), but it would be impractical as I'm using multiple inheritance, so I would very much like to know if there is a smarter solution.
interface A {
register(B* proxy);
}
interface B {
register(A* proxy);
}
Obviously I get an error in interface A, as B is not defined at that time. However because I'm dealing with interfaces and not classes it is appearently impossible to make a predefinition of B.
It might be feasible to translate the setup into classes (Where I could make the forward definition), but it would be impractical as I'm using multiple inheritance, so I would very much like to know if there is a smarter solution.
0
