Open WebFreak001 opened 2 years ago
D doesn't allow redefining functions with different return type.
To work around this you can use
public GtkArrowType _getDirection() { ... }
alias getDirection = _getDirection; // makes getDirection calls on this type call this function
however this could lead to confusion. Manually disabling code for the function and reimplementing works, but something easier in girtod (like a command to rename functions)
(like a command to rename functions)
You can use alias
to rename the function:
alias: get_direction _getDirection
ah ok thanks, I didn't see that in the readme for functions, but it's there under global - didn't think replace ctype with dtype would apply to function names as well
Example: Gtk.Widget defines
gtk.c.types.GtkTextDirection gtk.Widget.Widget.getDirection()
Libadwaita (Adw-1.gir) definesGtkArrowType getDirection()
girtod marks the method as override