konsoletyper / teavm

Compiles Java bytecode to JavaScript, WebAssembly and C
https://teavm.org
Apache License 2.0
2.62k stars 261 forks source link

Widen byte/short to ints in ObjectMethods #853

Closed SquidDev closed 10 months ago

SquidDev commented 10 months ago

If you have a record a byte (or short) field, TeaVM would generate a toString method which called the (non-existent) StringBuilder.append(B). We need to do similar logic to what StringBuilderEmitter does and convert byte/shorts to ints.

SquidDev commented 10 months ago

Thank you!