Pendrush Well-Known Member Licensed User Longtime User Nov 5, 2015 #1 With this code Code: Copy CallSubDelayed2(Me, "test", -1) Sub test(number As Int) '<- error on this line log (number) End Sub I get this error, but not every time, it happens in some random cases java.lang.IllegalArgumentException: argument 1 should have type int, got java.lang.Double In B4A v5.2 argument is always integer in this case. in B4A v5.5 beta #1, argument is sometimes integer, sometimes double
With this code Code: Copy CallSubDelayed2(Me, "test", -1) Sub test(number As Int) '<- error on this line log (number) End Sub I get this error, but not every time, it happens in some random cases java.lang.IllegalArgumentException: argument 1 should have type int, got java.lang.Double In B4A v5.2 argument is always integer in this case. in B4A v5.5 beta #1, argument is sometimes integer, sometimes double
Pendrush Well-Known Member Licensed User Longtime User Nov 5, 2015 #2 PS I case above, (on error) passed argument is -1.0 instead -1 com.e.rad.test.rad.main:_test, [-1.0]
Pendrush Well-Known Member Licensed User Longtime User Nov 5, 2015 #3 PS 2 hmmm, this is (look like) happening only in rapid debug, still testing.
Erel B4X founder Staff member Licensed User Longtime User Nov 5, 2015 #4 This is not a new issue. You need to set the type explicitly in this case: Code: Copy Dim i As Int = -1 CallSubDelayed2(Me, "test", i)
This is not a new issue. You need to set the type explicitly in this case: Code: Copy Dim i As Int = -1 CallSubDelayed2(Me, "test", i)