Monday, November 21, 2016

GWT 2.8 compile fails; 2.7 works

In our app, we have a UiBinder widget (SomeViewImpl) which has, as its root element, a widget which itself is a UiBinder widget (CollectionManagementLayout).

My UiBinder declaration in SomeViewImpl looks like this:
interface CollectionManagementPanelUiBinder extends UiBinder<CollectionManagementLayout, SomeViewImpl> {}


The UiBinder XML for the SomeViewImpl class starts off like this:
  <collectionmanagement:CollectionManagementLayout ui:field="layout">
    . . . 
  </collectionmanagement:CollectionManagementLayout>



This code compiles just fine in GWT 2.7, but with 2.8, I get the following error:

[ERROR] Errors in 'generated://09CDEAB17C92C8C75AB00C9F2F0DF847/com/myco/myproduct/client/stuff/collections/SomeViewImpl_CollectionManagementPanelUiBinderImpl.java'
      [ERROR] Line 17: The interface UiBinder cannot be implemented more than once with different arguments: UiBinder<CollectionManagementLayout,SomeViewImpl> and UiBinder<CollectionManagementLayout,SomeViewImpl>
      See snapshot: /tmp/com.myco.myproduct.client.stuff.collections.SomeViewImpl_CollectionManagementPanelUiBinderImpl3472216513944602205.java
   Tracing compile failure path for type 'com.myco.myproduct.client.stuff.collections.SomeViewImpl_CollectionManagementPanelUiBinderImpl'
      [ERROR] Errors in 'generated://09CDEAB17C92C8C75AB00C9F2F0DF847/com/myco/myproduct/client/stuff/collections/SomeViewImpl_CollectionManagementPanelUiBinderImpl.java'
         [ERROR] Line 17: The interface UiBinder cannot be implemented more than once with different arguments: UiBinder<CollectionManagementLayout,SomeViewImpl> and UiBinder<CollectionManagementLayout,SomeViewImpl>



The generated code looks like this:
public class SomeViewImpl_CollectionManagementPanelUiBinderImpl 
  implements UiBinder<CollectionManagementLayout, SomeViewImpl>, 
  SomeViewImpl.CollectionManagementPanelUiBinder {


I worked around this by changing the UiBinder declaration in SomeViewImpl to be:
interface CollectionManagementPanelUiBinder extends UiBinder<Widget, SomeViewImpl> {}


My question is: Should this have failed in GWT 2.7? Or is there a bug in GWT 2.8?

thanks,

jay

--
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 google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment