Switching to manual testing in your pom lets me run the test in a real browser, with breakpoints enabled.
diff --git a/pom.xml b/pom.xml
index 39c43269..58bd6671 100644
--- a/pom.xml
+++ b/pom.xml
@@ -108,6 +108,10 @@
<inherited>true</inherited>
<configuration>
<sourceLevel>1.8</sourceLevel>
+ <testArgs>
+ <arg>-runStyle</arg>
+ <arg>Manual:1</arg>
+ </testArgs>
</configuration>
</plugin>
</plugins>
The emulated stack trace experience isn't very much fun, but after a time it is possible to see that the function is being called with an array, [5, 10] from inside bootstrap itself - but the bootstrap code specifically shows that it is only passing the 0th element, as this._state.value[0].
In order to call the Java lambda with its generic arg, GWT inserts a typecheck for generics. Range is declared as "actually this is an Array", so GWT emulates that check with Array.isArray:
Zz(($B = (ZB[b] = iD + oD,
a) == null || (ZB[b] = iD + pD,
Array).isArray(($B = (ZB[b] = iD + oD,
a),
Again, this is nasty to read because of emulated stack traces - but 5 clearly fails that check.
I then added a `debugger` statement to the JSNI function, to see if it saw the same thing - it was actually called several times, first with 5, then 10, before finally the expected [1,2] array. When it received 5 and 10, the result returned was the useless string "Range: [undefined,undefined]".
Is it wrong for GWT to check the types here? It is causing you a headache for sure, but the lambda is clearly nonsense if you get a number instead of a range array. You could take something like Any or Object as the param and typecheck it, or maybe there's a different way to use bootstrap here to get the result you expect?