Oh sorry. I totally misread. So you are saying if you DON'T set
'jre.checks.checkLevel" to MINIMaL everything works fine? That's very
surprising. You should reproduce the the issue and file a bug.

On Mon, May 2, 2016 at 12:03 PM, Paul Stockley <[email protected]> wrote:

> It wasn't to get around underlying cast problems, just more for code size
> and speed improvements.  I guess the behavior was kind of unexpected in
> SDM. Ideally using  jre.checks.checkLevel mininal  should work in SDM or
> at the very least give an error stating it is incompatible.
>
>
> On Monday, May 2, 2016 at 2:06:08 PM UTC-4, Goktug Gokdogan wrote:
>>
>> If you need to disable cast checking, you are definitely doing something
>> wrong; you should fix underlying problem instead of disabling checks.
>>
>> On Sun, May 1, 2016 at 6:19 AM, Paul Stockley <[email protected]> wrote:
>>
>>> I am trying to create a native JsType to represent a javascript Array.
>>> Up to this point I have been using JSNI. Below is the outline of what I
>>> have. I want to use an Interface as my eventual goal is to be able to
>>> define JSON structures using the same class on client and server.
>>>
>>> @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Array")
>>> public interface Array<T> {
>>>
>>>
>>>    @JsOverlay
>>>    default T get(int index) {
>>>       return JSHelper.getArrayValue(this, index);
>>>
>>>    }
>>>
>>>
>>>    ...Rest of native methods
>>>
>>>
>>> *}*
>>>
>>>
>>> The Helper.getArrayValue method maps to a native function I define outside 
>>> of GWT. I have been trying to track down an error that
>>>
>>> only happened in SDM. When I called the get method, I would get the 
>>> following error:
>>>
>>>
>>>
>>> *ArrayTest.java:14Uncaught ReferenceError: S$c_g$ is not defined*
>>>
>>>
>>> On a side note, tracking down these kind of problems is a real pain given 
>>> that all the function names are obfuscated in SDM.
>>>
>>> I tried -XmethodNameDisplayMode ABBREVIATED. However, this only works for 
>>> methods defined in my modules. Is there another
>>>
>>> way to turn off obfuscation?
>>>
>>>
>>> Anyway, it turns out the problem is the following line I had in may gwt.xml 
>>> file
>>>
>>>
>>> <set-property name="jre.checks.checkLevel" value="MINIMAL" />
>>>
>>>
>>> I had this to strip out cast checking from my final production compile. If 
>>> I remove this, it works fine.
>>>
>>>
>>>
>>> --
>>> 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 [email protected]
>>> .
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/google-web-toolkit-contributors/26f49d6c-a5fc-4dbe-9f9e-840be96a2f1c%40googlegroups.com
>>> <https://groups.google.com/d/msgid/google-web-toolkit-contributors/26f49d6c-a5fc-4dbe-9f9e-840be96a2f1c%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/google-web-toolkit-contributors/ebbf8dd5-3180-4a1f-936b-8118e1679edc%40googlegroups.com
> <https://groups.google.com/d/msgid/google-web-toolkit-contributors/ebbf8dd5-3180-4a1f-936b-8118e1679edc%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit-contributors/CAN%3DyUA2S7nW77D_ROUcQUse-Bgmq1pP904%2Bj-aYm7V%2BcuaOcig%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to