You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following code seems to yield different results on Java and in ObjC:
Character c = '\n';
try {
System.out.println((int) c);
} catch (Exception e) {
System.out.println(e);
}
Compiling with javac, this yields 10 (correctly), while j2objc throws this exception:
java.lang.ClassCastException: Cannot cast object of type java.lang.Character to JavaLangInteger
Which seems to be due to the fact that unboxing + widening casts are handled for all numeric types except Character (which does not have the intValue/longValue/doubleValue etc. conversion methods).
I'll upload a PR with an attempt to address this issue shortly.
The text was updated successfully, but these errors were encountered:
The following code seems to yield different results on Java and in ObjC:
Compiling with javac, this yields 10 (correctly), while j2objc throws this exception:
Which seems to be due to the fact that unboxing + widening casts are handled for all numeric types except Character (which does not have the intValue/longValue/doubleValue etc. conversion methods).
I'll upload a PR with an attempt to address this issue shortly.
The text was updated successfully, but these errors were encountered: