Thursday, September 10, 2020

Re: Weird type error in lambdas with generics, with JsInterop

Actually, I was able to pin-point to a small piece of code. 
My feeling is that it fails every time where the callback is a method reference which involved generic types.

JsInterop method called:
@JsType(isNative = true, name = "window", namespace = "<global>")
public class CordovaFileSystemGlobal {
    public static native void resolveLocalFileSystemURL(String url, FileSystemEntryCallback success, FileErrorCallback error);

In another, class Invocation:
public void resolveLocalFileSystemURL(String url, FileCallback<FileSystemEntry, com.inspectivity.go.client.filesystem.webkit.FileError> callback) {
    CordovaFileSystemGlobal.resolveLocalFileSystemURL(url, callback::onSuccess, callback::onFailure);

File Callback:
public interface FileCallback<S, E> {
         public void onSuccess(S entry);
         public void onFailure(E error);


You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

No comments:

Post a Comment