The following class appears to be legal java (eclipse accepts it ok) but it causes an internal error in the gwt compiler (java -> javascript). Has anyone found a workaround to allow code like this to run?
If you try to instantiate this class with public enum MyFormField { FIELD1, OTHER_FIELD; }; and then this declaration: public class MyFormErrorSet extends ErrorSet<MyFormField> { }; the compiler blows up with an internal error.... Thoughts? thanks ian smith package whatever.whatever; import java.util.ArrayList; import java.util.Iterator; import java.util.List; public abstract class ErrorSet<E extends Enum<E>> { protected List<E> errors = new ArrayList<E>(); public boolean hasNoErrors() { return errors.isEmpty(); } public E errorAtRow(int rowTarget) { Iterator<E> iter = errors.iterator(); while (iter.hasNext()) { E f = iter.next(); if (getRowForEnumItem(f) == rowTarget) { return f; } } return null; } public void add(E f) { if (errorAtRow(getRowForEnumItem(f)) != null) { return; } errors.add(f); } public int size() { return errors.size(); } public E get(int element) { return errors.get(element); } public abstract int getRowForEnumItem(E item); } --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---