[gwt-contrib] Re: GWT 1.5.3: Type mismatch with enum in parameterized class.

2009-01-22 Thread Isaac Truett

And if I'd been silly enough to bet against you, Scott, then I
would've lost. For posterity:

1. SVN r4361 contains the updated JDT. I copied that to my 1.5 release branch.
2. SVN r4362 contains a small code change to LongFromJSNIChecker.java.
I applied that to my 1.5 branch.
3. SVN r4362 also contains the change to dev/core/build.xml to use the
new jar. Applied that.
4. Build and enjoy.

Thank you very much, Scott. This duct tape should hold until I can
upgrade to 1.6.

@Bruce - I'm eagerly waiting the turning of that corner!


Love the toolkit. Love the fast, friendly, free support. Thank you all!

- Isaac


On Wed, Jan 21, 2009 at 6:55 PM, Scott Blum sco...@google.com wrote:
 Isaac, I would put money on our updating to a newer version of JDT.  I'd
 find where Lex committed this upgrade... if there are no code changes, you
 might try putting the newer JDT higher on the classpath as a test.  If that
 works, simple jar surgery should get you where you want to go.

 On Wed, Jan 21, 2009 at 10:54 AM, Isaac Truett itru...@gmail.com wrote:

 I've found an interesting error in GWT 1.5.3:

  [ERROR] Line 14: Type mismatch: cannot convert from
 Test.Parametric.Number
 s to Test.ParametricT.Numbers
  [ERROR] Line 17: Type mismatch: cannot convert from
 Test.Parametric.Number
 s to Test.ParametricT.Numbers
 Compiling module test.Test
 Computing all possible rebind results for 'test.client.Test'
   Rebinding test.client.Test
  Checking rule generate-with
 class='com.google.gwt.user.rebind.ui.ImageBun
 dleGenerator'/
 [ERROR] Unable to find type 'test.client.Test'
[ERROR] Hint: Previous compiler errors may have made this type
 unava
 ilable
[ERROR] Hint: Check the inheritance chain from your module; it
 may n
 ot be inheriting a required module or a module may not be adding its
 source path
  entries properly


 To reproduce:

 public class Test implements EntryPoint {
  static class ParametricT {
enum Numbers {
  ONE, TWO;
}
  }

  public void onModuleLoad() {
switch (Parametric.Numbers.valueOf(ONE)) {
  case ONE: // Line 14
System.out.println(ONE);
break;
  case TWO: // Line 17
System.out.println(ONE);
break;
}
  }
 }

 Removing the parameter from the type enclosing the enum fixes the problem.

 The above *works* in trunk and 1.6, but I searched a little bit and I
 couldn't find anything in the issue tracker that appeared related.
 Upgrading to 1.6/trunk isn't a good option for me at the moment, so
 I'm hoping that someone has seen this before and could help me find
 the change that fixed it. If it's a simple patch, I can apply it to
 1.5.3 until such time as an upgrade is possible. Moving the enum to a
 non-parameterized type would probably work as well, but I'm loathe to
 do too much redesign on account of a compiler bug that appears to
 already have been fixed.




 


--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: GWT 1.5.3: Type mismatch with enum in parameterized class.

2009-01-21 Thread Scott Blum
Isaac, I would put money on our updating to a newer version of JDT.  I'd
find where Lex committed this upgrade... if there are no code changes, you
might try putting the newer JDT higher on the classpath as a test.  If that
works, simple jar surgery should get you where you want to go.

On Wed, Jan 21, 2009 at 10:54 AM, Isaac Truett itru...@gmail.com wrote:


 I've found an interesting error in GWT 1.5.3:

  [ERROR] Line 14: Type mismatch: cannot convert from
 Test.Parametric.Number
 s to Test.ParametricT.Numbers
  [ERROR] Line 17: Type mismatch: cannot convert from
 Test.Parametric.Number
 s to Test.ParametricT.Numbers
 Compiling module test.Test
 Computing all possible rebind results for 'test.client.Test'
   Rebinding test.client.Test
  Checking rule generate-with
 class='com.google.gwt.user.rebind.ui.ImageBun
 dleGenerator'/
 [ERROR] Unable to find type 'test.client.Test'
[ERROR] Hint: Previous compiler errors may have made this type
 unava
 ilable
[ERROR] Hint: Check the inheritance chain from your module; it
 may n
 ot be inheriting a required module or a module may not be adding its source
 path
  entries properly


 To reproduce:

 public class Test implements EntryPoint {
  static class ParametricT {
enum Numbers {
  ONE, TWO;
}
  }

  public void onModuleLoad() {
switch (Parametric.Numbers.valueOf(ONE)) {
  case ONE: // Line 14
System.out.println(ONE);
break;
  case TWO: // Line 17
System.out.println(ONE);
break;
}
  }
 }

 Removing the parameter from the type enclosing the enum fixes the problem.

 The above *works* in trunk and 1.6, but I searched a little bit and I
 couldn't find anything in the issue tracker that appeared related.
 Upgrading to 1.6/trunk isn't a good option for me at the moment, so
 I'm hoping that someone has seen this before and could help me find
 the change that fixed it. If it's a simple patch, I can apply it to
 1.5.3 until such time as an upgrade is possible. Moving the enum to a
 non-parameterized type would probably work as well, but I'm loathe to
 do too much redesign on account of a compiler bug that appears to
 already have been fixed.

 


--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: GWT 1.5.3: Type mismatch with enum in parameterized class.

2009-01-21 Thread Bruce Johnson
In terms of the GWT 1.5 code line, we're very unlikely to actually release a
1.5.4...GWT 1.6 is just around the corner.

On Wed, Jan 21, 2009 at 6:55 PM, Scott Blum sco...@google.com wrote:

 Isaac, I would put money on our updating to a newer version of JDT.  I'd
 find where Lex committed this upgrade... if there are no code changes, you
 might try putting the newer JDT higher on the classpath as a test.  If that
 works, simple jar surgery should get you where you want to go.


 On Wed, Jan 21, 2009 at 10:54 AM, Isaac Truett itru...@gmail.com wrote:


 I've found an interesting error in GWT 1.5.3:

  [ERROR] Line 14: Type mismatch: cannot convert from
 Test.Parametric.Number
 s to Test.ParametricT.Numbers
  [ERROR] Line 17: Type mismatch: cannot convert from
 Test.Parametric.Number
 s to Test.ParametricT.Numbers
 Compiling module test.Test
 Computing all possible rebind results for 'test.client.Test'
   Rebinding test.client.Test
  Checking rule generate-with
 class='com.google.gwt.user.rebind.ui.ImageBun
 dleGenerator'/
 [ERROR] Unable to find type 'test.client.Test'
[ERROR] Hint: Previous compiler errors may have made this type
 unava
 ilable
[ERROR] Hint: Check the inheritance chain from your module; it
 may n
 ot be inheriting a required module or a module may not be adding its
 source path
  entries properly


 To reproduce:

 public class Test implements EntryPoint {
  static class ParametricT {
enum Numbers {
  ONE, TWO;
}
  }

  public void onModuleLoad() {
switch (Parametric.Numbers.valueOf(ONE)) {
  case ONE: // Line 14
System.out.println(ONE);
break;
  case TWO: // Line 17
System.out.println(ONE);
break;
}
  }
 }

 Removing the parameter from the type enclosing the enum fixes the problem.

 The above *works* in trunk and 1.6, but I searched a little bit and I
 couldn't find anything in the issue tracker that appeared related.
 Upgrading to 1.6/trunk isn't a good option for me at the moment, so
 I'm hoping that someone has seen this before and could help me find
 the change that fixed it. If it's a simple patch, I can apply it to
 1.5.3 until such time as an upgrade is possible. Moving the enum to a
 non-parameterized type would probably work as well, but I'm loathe to
 do too much redesign on account of a compiler bug that appears to
 already have been fixed.




 


--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---