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
Some of the primitive types in Java that don't have a correspondent type in Python are not translated correctly.
For example, short in Java should become int in Python. char should become str, and I see that there is a rule in this direction in the config/default.py but no effect.
Test example:
class Primitives {
char chr;
byte byt;
short shr;
int in_t;
long lng;
float flt;
double dbl;
}
Generates the output:
class Primitives(object):
chr = char() # <- Problem
byt = byte() # <- Problem
shr = short() # <- Problem
in_t = int()
lng = long() # <- Problem
flt = float()
dbl = float()
Activity
natural commentedon Apr 23, 2012
Fixed in 764be76.
natural commentedon Apr 23, 2012
Also, I'm not going to change the
long()conversion because that's valid Python 2.x. If/when we support 3.x, that will have to go.iuliux commentedon Apr 23, 2012
Thanks for the quick fixing.
Yes, you're right with
long, my bad.