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

Reply via email to