Open GuillaumeGomez opened 5 years ago
As said there, I don't think we can automatically do this. We might with some new configuration in the toml file that specifies that the type of callback parameter X is the same type as function parameter Y, or something like that.
@sdroege That we can do automatically? IMHO we have stable rule: it type is final - then use it directly if not - use IsA and this not depend on it parameter number.
Oh, you meant that we can't detect real type of closure.
Yes, we can't know that e.g. the first parameter of the closure is the same as some parameter of the function, e.g. &self
. So we can't know a more specific type for it other than what is provided by the .gir file.
In reference to this conversation: https://github.com/gtk-rs/gtk/pull/760/files#r249967963