You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"Named" and "unnamed" constructors are handled differently in Java:
Unnamed constructor foo_new(): a normal new Foo() {} constructor in Java
Named constructor foo_new_with_bar(): a factory method static Foo withBar() {} in Java
Java-gi currently forces the return type of all constructors to be the enclosing type. But for a named constructor it is better to set the requested return type for the static method to the one that was specified in the gir file.
Note: Most Gtk constructors return Widget, regardless of the actual type, so for Gtk a workaround will be necessary to prevent a regression there.
"Named" and "unnamed" constructors are handled differently in Java:
foo_new()
: a normalnew Foo() {}
constructor in Javafoo_new_with_bar()
: a factory methodstatic Foo withBar() {}
in JavaJava-gi currently forces the return type of all constructors to be the enclosing type. But for a named constructor it is better to set the requested return type for the static method to the one that was specified in the gir file.
Note: Most Gtk constructors return
Widget
, regardless of the actual type, so for Gtk a workaround will be necessary to prevent a regression there.This issue was logged as a follow-up to #156
The text was updated successfully, but these errors were encountered: