-
-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot override overloaded method #63
Comments
I'm getting the same error when overloading on number of arguments. public static interface Logger {
public void print();
public void print(Object value);
} |
Implementing Java interfaces require different syntax. You cannot use I will investigate the case with |
@slavchev as you can see in my code I do |
Indeed we have identified a bug and a fix is already in the works. Thanks for reporting this. |
The master have been updated with the fix for that, closing this issue. |
Hi, I found that implementing firebase CompletionListener is not working :
and here's the firebase android doc for it
and here's the error message
Is the android method override has limitation on parameters? Thanks |
We don't support
|
Ill try.. Thanks |
According to the documentation it's possible to extend a Java Class with overloaded methods and override such method from JavaScript.
However the runtime doesn't support overriding methods that are overloaded on the type of the argument, or on the number of arguments (see 1st comment).
Extending such a Java class will only override the first method overload.
Similarly, implementing an interface with such overloaded methods will cause a
java.lang.AbstractMethodError
to be thrown when attempting to call any method other than the first.Java:
Javascript:
Log output:
The text was updated successfully, but these errors were encountered: