no, not to the input, but for sure to the left assignment type, like: A a = GWT.create(Foo.class);
that instruction is totaly valid even though Foo has no relation to A, but whatever GWT.create() returns HAS to be assignable to A, afair this check was explicetely done during compile in prior GWT versions? On 9 Feb., 15:49, Scott Blum <[email protected]> wrote: > The result of a GWT.create() does not have to be assignable to the input > type, it just usually is. This has been true forever, actually. There are > certain uses for it. > > > > > > > > On Wed, Feb 9, 2011 at 9:00 AM, ep <[email protected]> wrote: > > hi, > > > in 2.1.1 (release) when writing a generator I noticed that compiler > > does not perform type checking for the result, causing the application > > to break during runtime. Afair the compiler did that check in 2.0.4 > > unless I'm mistaken... > > -------- > > sample: > > > interface A { > > id(); > > } > > > class Foo { > > A a = GWT.create(A.class); > > } > > > MyGenerator creates a class: > > > A_Impl { > > } > > > Compiler is fine with that result, whereas that A_Impl shall be > > implementing A? The self-(syntax) validation of A_Impl however, works > > fine. But missing type check against expected class. > > > -- > >http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
