Compiled using 2.8.0-SNAPSHOT and without -generateJsInteropExports.
With -generateJsInteropExport works! (i.e.: Foo.bar field is not pruned)

On Tuesday, April 12, 2016 at 3:57:10 PM UTC+2, Ignacio Baca Moreno-Torres 
wrote:
>
> This code:
> public class Client implements EntryPoint {
>     Console log = Browser.getWindow().getConsole();
>
>     @Override public void onModuleLoad() {
>         Foo foo = new Foo();
>         foo.bar = 666;
>         log.log(foo);
>     }
>     
>     @JsType public static class Foo {
>         public int bar;
>     }
> }
>
>
> Generate this js:
> function $onModuleLoad(this$static){
>   var foo;
>   foo = new Client$Foo;
>   $log(this$static.log_0, foo);
> }
>
>
> I.e.: the Foo.bar var is pruned. This makes this common case (IMHO) fail 
> silently (an empty object is sent to the server):
>
> Foo f = new Foo(); f.bar=666; request.send(f);
>
> This can be fixed using isNative=true, which might be ok, but the 
> important thing is that this code fails silently which is really annoying. 
> Thanks.
>
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit-contributors/c9fd1ad7-44b9-44f9-832a-99cd2be48de9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to