I'm not sure if this is intended, but I've noticed that JSNI methods on string do not work.
I tried equals, compareTo, compareToIgnoreCase and charAt, but none of them worked.
I used my fork and the pristine 2.7, and in super dev + regular compile; in all cases, the functions come back undefined.
native char jsni(String s)
/*-{
var fn = s.@java.lang.String::charAt(I);
// fn is undefined
return fn(0); // doom
}-*/;
In compiled code, it looks something like:
var fn = string_0_g$.charAt_3_g$;
So, my question, is this expected behaviour?
If so, are there other types I need to guard against JSNI failures?
If not, should I file a bug and look into a patch?
(Assuming a patch would be a rewrite static method visitor that can replace jsni method refs with a staticified version).
For my reflection support, I'm going to guard against this by making public methods not use JSNI,
but if there are other types or gotchas I should be aware of, it would be nice to know about them.
Thanks!